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

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Jul 29 01:51:26 EEST 2021


On 7/27/2021 2:08 PM, James Almer wrote:
> Since we can't blindly trust the keyframe flag in packets and assume its
> contents are a valid Sync Sample, do some basic bitstream parsing to build the
> Sync Sample table in addition to a Random Access Recovery Point table.
> 
> Suggested-by: ffmpeg at fb.com
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/movenc.c         | 125 +++++++++++++++++++++++++++++++++--
>  libavformat/movenc.h         |   1 +
>  tests/ref/lavf-fate/h264.mp4 |   6 +-
>  3 files changed, 123 insertions(+), 9 deletions(-)

This problem (due to insufficient API) exists for a lot more codecs
than H.264 - are we going to fill movenc.c with parsers for HEVC,
AV1, MPEG-4 ASP, etc., or just make only on codec behave this way?

- Derek


More information about the ffmpeg-devel mailing list