[FFmpeg-devel] [PATCH] Move packed B-frames message level to info.

Paul B Mahol onemda at gmail.com
Mon Sep 9 00:30:51 CEST 2013


On 9/8/13, wm4 <nfxjfg at googlemail.com> wrote:
> On Mon, 9 Sep 2013 00:09:54 +0200
> Reimar Doeffinger <Reimar.Doeffinger at gmx.de> wrote:
>
>> On 08.09.2013, at 23:48, wm4 <nfxjfg at googlemail.com> wrote:
>> > On Sun,  8 Sep 2013 19:49:55 +0200
>> > Reimar Doeffinger <Reimar.Doeffinger at gmx.de> wrote:
>> >
>> >> Since they generally decode fine, printing it as a warning
>> >> might not really be appropriate.
>> >>
>> >> Signed-off-by: Reimar Doeffinger <Reimar.Doeffinger at gmx.de>
>> >> ---
>> >> libavcodec/mpeg4videodec.c | 2 +-
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
>> >> index c81a917..fa32aa6 100644
>> >> --- a/libavcodec/mpeg4videodec.c
>> >> +++ b/libavcodec/mpeg4videodec.c
>> >> @@ -1912,7 +1912,7 @@ static int decode_user_data(MpegEncContext *s,
>> >> GetBitContext *gb){
>> >>         s->divx_build= build;
>> >>         s->divx_packed= e==3 && last=='p';
>> >>         if(s->divx_packed && !s->showed_packed_warning) {
>> >> -            av_log(s->avctx, AV_LOG_WARNING, "Video uses a
>> >> non-standard and "
>> >> +            av_log(s->avctx, AV_LOG_INFO, "Video uses a non-standard
>> >> and "
>> >>                    "wasteful way to store B-frames ('packed B-frames').
>> >> "
>> >>                    "Consider using a tool like VirtualDub or avidemux
>> >> to fix it.\n");
>> >>             s->showed_packed_warning=1;
>> >
>> > +1
>> >
>> > By the way, I've noticed that the redundant messages are actually
>> > printed by the parser. libavformat recreates the parser after each
>> > seek, and the parser uses parts of the decoder. Consequently, the
>> > messages is printed again after each seek.
>> >
>> > Maybe the parser should initialize s->showed_packed_warning to 1, so
>> > that only the actual decoder prints the warning? (However, I'm not sure
>> > if that matches with the ffmpeg policy about handling broken data.)
>>
>> I don't know how to avoid it, but I think the parser isn't supposed to
>> print these messages really.
>> In fact, I don't really understand why the parser would/should even cause
>> that code to be executed, it doesn't really seem right to me.
>
> It reuses some of the parsing code, and the code printing the message
> is part of it. You can also see AVCodecContexts spread throughout the
> parsing code. (I'm not really sure how this parsing stuff is supposed
> to work, but it doesn't seem unusual for it to involve decoders or
> parts of them.)

(Not looking at code) Perhaps verbosity of messages from this parser
can be lowered?

See flac praser for example.


More information about the ffmpeg-devel mailing list