[Libav-user] Force low-delay handling? question + feature suggestion

Alex Cohn alexcohn at netvision.net.il
Thu Nov 24 11:53:56 CET 2011


On Thu, Nov 24, 2011 at 12:06, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Camera Man <i.like.privacy.too at ...> writes:
>
>> would it work to patch ff_h264_decode_init() and decode_postinit() to also
>> check the AV_DISCARD mode, and if we are discarding B and/or nonref frames,
>> would set avctx->has_b_frames=0 and low_delay=1 ?
>
> I don't know but I suggest that you write such a patch (optionally test it on
> streams with B-frames) and post it on ffmpeg-devel where it can be discussed.

Maybe I am missing something, but if you discard B frames you may have
problems with the P frames that follow (and that until you get the
next I frame). Also, note that the codecs check
avctx->skip_loop_filter not as bitfield, but priority. Thus,
AVDISCARD_BIDIR means also AVDISCARD_NONREF, which is probably not
what you want.

I believe that the correct way to fix is to modify SPS/PPS, because
these are simply wrong in your case.

BR,
Alex Cohn


More information about the Libav-user mailing list