mtmd: video: fix moov at the end of file

Co-authored-by: rkfg <rkfg@rkfg.me>
This commit is contained in:
Xuan Son Nguyen
2026-08-23 11:37:50 +02:00
parent 8144f3192e
commit ba8b1c440d
+5
View File
@@ -673,6 +673,11 @@ struct mtmd_helper_video {
}
cmd.push_back("-nostdin");
if (is_buf_input()) {
// remove the 64KB read-ahead limit of cache:, or else ffmpeg cannot reach a moov atom at end of file
cmd.push_back("-read_ahead_limit");
cmd.push_back("-1");
}
cmd.push_back("-i");
// cache:pipe:0 wraps stdin with a seekable in-memory cache, letting ffmpeg seek
// backwards for container headers (e.g. MP4 moov atom at end of file)