Re: [FFmpeg-devel] [PATCH] lavf/apngdec: print currently unsupported in-stream tags in a more readable form
Hi, On November 22, 2014 5:45:17 PM GMT+01:00, James Almer jamr...@gmail.com wrote: Also use length and not stream position Signed-off-by: James Almer jamr...@gmail.com --- libavformat/apngdec.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index db501ec..1e0f1c7 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 (0x%08X) len=%PRIu32, tag_buf, tag, len); avio_skip(pb, len + 4); +} } /* Handle the unsupported yet cases */ LGTM, thanks. -- Ben ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/apngdec: print currently unsupported in-stream tags in a more readable form
On 23/11/14 10:22 AM, Benoit Fouet wrote: Hi, On November 22, 2014 5:45:17 PM GMT+01:00, James Almer jamr...@gmail.com wrote: Also use length and not stream position Signed-off-by: James Almer jamr...@gmail.com --- libavformat/apngdec.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index db501ec..1e0f1c7 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 (0x%08X) len=%PRIu32, tag_buf, tag, len); avio_skip(pb, len + 4); +} } /* Handle the unsupported yet cases */ LGTM, thanks. Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavf/apngdec: print currently unsupported in-stream tags in a more readable form
Also use length and not stream position Signed-off-by: James Almer jamr...@gmail.com --- libavformat/apngdec.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index db501ec..1e0f1c7 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 (0x%08X) len=%PRIu32, tag_buf, tag, len); avio_skip(pb, len + 4); +} } /* Handle the unsupported yet cases */ -- 2.1.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel