[FFmpeg-devel] [PATCH 2/2] lavf/apngdec: print currently unsupported in-stream tags in a readable form

Benoit Fouet benoit.fouet at free.fr
Sat Nov 22 08:21:08 CET 2014


Hi,

On November 21, 2014 11:09:34 PM GMT+01:00, James Almer <jamrial at gmail.com> wrote:
>Also use length and not stream position
>
>Signed-off-by: James Almer <jamrial at gmail.com>
>---
> libavformat/apngdec.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
>index 2af87ad..ce62190 100644
>--- a/libavformat/apngdec.c
>+++ b/libavformat/apngdec.c
>@@ -372,8 +372,13 @@ static int apng_read_packet(AVFormatContext *s,
>AVPacket *pkt)
>             return ret;
>         return 0;
>     default:
>-        avpriv_request_sample(s, "In-stream tag=%#08X len=%"PRId64"",
>tag, avio_tell(pb));
>+        {
>+        char tag_buf[5];
>+
>+        av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
>+        avpriv_request_sample(s, "In-stream tag=%s len=%"PRIu32,
>tag_buf, len);
>         avio_skip(pb, len + 4);
>+        }
>     }
> 
>     /* Handle the unsupported yet cases */

I'm fine with the len part, of course.
As for the tag part, could you please keep the u32 version too? Like "%s (%#08X)".

Thanks,
-- 
Ben


More information about the ffmpeg-devel mailing list