lavf/apngdec: print currently unsupported in-stream tags in a more readable form
authorJames Almer <jamrial@gmail.com>
Sat, 22 Nov 2014 16:41:43 +0000 (13:41 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 23 Nov 2014 16:01:26 +0000 (13:01 -0300)
Also use length and not stream position

Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/apngdec.c

index db501ec..1e0f1c7 100644 (file)
@@ -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 (0x%08X) len=%"PRIu32, tag_buf, tag, len);
         avio_skip(pb, len + 4);
+        }
     }
 
     /* Handle the unsupported yet cases */