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

Alex Cohn alexcohn at netvision.net.il
Mon Mar 12 09:49:29 CET 2012

On Mon, Mar 12, 2012 at 10:28, Camera Man <i.like.privacy.too at gmail.com> wrote:
> Where avcodec_h264_internal_fetch_most_recent() would get a copy of the
> highest pts frame in the delay buffer, without changing or discarding it. If
> this is possible (and I manage to write this ... I'm not sure I understand
> all of h264 internals), then it would introduce a "lowest delay" from
> bitstream to display - at the cost of not showing any out-of-order frames
> (having an effectively lower frame rate - but much better real-time
> latency).

Your suggestion looks incorrect to me: the frames that you may skip
this way could be referenced by the frames you want to display,
therefore your result will be distorted.

You should decode as many frames as possible at any time. The question
is - which frames to display. You can safely choose to always display
the latest (in terms of pts).


More information about the Libav-user mailing list