[FFmpeg-devel] [PATCH]lavf/avidec: Be more verbose when ignoring very large tag size

Clément Bœsch u at pkh.me
Tue Oct 18 09:11:41 EEST 2016


On Tue, Oct 18, 2016 at 12:42:18AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch prints the tag and the tag size when ignoring the size.
> 
> Please comment, Carl Eugen

> From e99dc274b7b4b4b5ef502ddb0a8245c1f47c2ece Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Tue, 18 Oct 2016 00:37:06 +0200
> Subject: [PATCH] lavf/avidec: Be more verbose when ignoring very large tag
>  size.
> 
> ---
>  libavformat/avidec.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index b291625..2fcb0ee 100644
> --- a/libavformat/avidec.c
> +++ b/libavformat/avidec.c
> @@ -986,7 +986,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
>              if (size > 1000000) {
>                  av_log(s, AV_LOG_ERROR,
>                         "Something went wrong during header parsing, "
> -                       "I will ignore it and try to continue anyway.\n");
> +                       "tag %c%c%c%c has size %u, "
> +                       "I will ignore it and try to continue anyway.\n",
> +                       tag & 0xff, tag >> 8 & 0xff, tag >> 16 & 0xff, tag >> 24 & 0xff,
> +                       size);

please use av_get_codec_tag_string() if the tag can be anything, it will
prevent printing special characters.

-- 
Clément B.


More information about the ffmpeg-devel mailing list