1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-09-16 08:36:51 +02:00

avformat/movenc: remove mvex from final mp4 in hybrid_fragmented mode

In hybrid_fragmented mode, the first moov at start should contain
mvex tag, since it's fmp4. When writing the moov at the second time,
it's not fmp4 any more, so mvex should be skipped.
This commit is contained in:
Zhao Zhili
2025-09-01 14:55:44 +08:00
committed by James Almer
parent 126671e730
commit 9a34ddc345
3 changed files with 8 additions and 4 deletions

View File

@@ -5183,7 +5183,11 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
return ret;
}
}
if (mov->flags & FF_MOV_FLAG_FRAGMENT)
/* Don't write mvex for hybrid_fragmented during mov_write_trailer
* (mov->moov_written != 0)
*/
if (mov->flags & FF_MOV_FLAG_FRAGMENT &&
!(mov->flags & FF_MOV_FLAG_HYBRID_FRAGMENTED && mov->moov_written))
mov_write_mvex_tag(pb, mov); /* QuickTime requires trak to precede this */
if (mov->mode == MODE_PSP)