Cosmetic nerd nit:
> +            av_log(avctx, AV_LOG_DEBUG, "large len %x \n", ((tagu & 0xff) << 16) | data);
> +        } else if (tag == 20) {
> +            av_log(avctx, AV_LOG_DEBUG, "Width %"PRIu16" \n", data);
                                                           ^
You're logging a lot of trailing whitespace throughout most of your
av_log() calls.
Moritz