[FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

Hendrik Leppkes h.leppkes at gmail.com
Sat Jul 31 15:40:11 EEST 2021


On Sat, Jul 31, 2021 at 11:41 AM Michael Niedermayer
<michael at niedermayer.cc> wrote:
> Theres also the 2nd situation where all the information the parser
> extracts is already known to the lib user and going over the whole
> bitstream is wasting cpu cycles. This can be a situation where for
> example all input files where just a moment ago created by FFmpeg
> and we assume these would then be as compliant as redoing the parsing
> would make them
>

This is however not necessarily the case, because we only have one
keyframe field and there are quite varying definitions of what a
container would consider a keyframe for their own purposes.
This is the entire reason this patch was created in the first place,
because different containers have different keyframe semantics, and a
single field in AVPacket cannot cleanly represent it.

A container therefore determining for its own definition of keyframe
how to mark them is the only reliable way currently.

- Hendrik


More information about the ffmpeg-devel mailing list