[FFmpeg-devel] [PATCH] avformat: add AVFMT_INIT_ZERO_SKIP flag and use it in MOV

Lynne dev at lynne.ee
Mon Oct 30 20:56:59 EET 2023


Meant to be applied on top my AAC patchset.

MOV trims both the decoder/codec's algorithmic delay,
and additionally, any samples the encoder needs removed, via edit lists,
which we export as skip_samples side data.

The issue is that if there are no edit lists, with the recent AAC
decoding algorithmic delay removal patch, the default, algorithmic
delay will be removed of 1024 samples.

However, MOV specifies that this delay should be left as-is, even if
edit lists are not used.

demux.c, however, only signals a SKIP_SAMPLES side data if it is non-zero.
Hence, this patch just changes this such that side data will always be
put for MOV, even if it is zero, for only the first frame.

This way, the decoder will not skip the algorithmic delay by itself.

Patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avformat-add-AVFMT_INIT_ZERO_SKIP-flag-and-use-it-in.patch
Type: text/x-diff
Size: 2939 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231030/ed328526/attachment.patch>


More information about the ffmpeg-devel mailing list