[FFmpeg-devel] [PATCH] Revert "avformat/mov: disallow a zero sample size in trun atoms"

Chris Ribble chris.ribble at resi.io
Fri Dec 2 02:46:02 EET 2022


On Thu, Dec 1, 2022 at 4:51 PM Marton Balint <cus at passwd.hu> wrote:
>
> Can you explain why those files are considered valid, or why it makes
> sense to generate such files?
>
> Thanks,
> Marton
>

As far as I can tell, the file that a user provided with this problem
was generated by an encoder (running FFmpeg 3.4) that started writing
zero-sized samples when their video switcher + capture card stopped
receiving audio input. I'm not arguing that it's good for files to be
generated like this, but it's nice for FFmpeg to be able to process
them all the same (i.e. the robustness principle).

With this patch reverted, FFmpeg can accept an input file that is
partially broken (with playback anomalies due to the presence of
zero-sized samples) and produce a valid, working output mp4 (or DASH
stream), just like it could in release 5.0 and older.

One of the best things about FFmpeg is that it can fix invalid
container metadata. I feel like losing that capability for this
scenario is a regression.

Thanks,
Chris


More information about the ffmpeg-devel mailing list