Commit da4c3566c7 for ffmpeg
commit da4c3566c70118bba90eba06b8dc28b0ada15a6a
Author: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Date: Fri Nov 20 23:47:02 2026 -0800
avformat/movenc: clear the track header flags on MOV hint tracks
The QuickTime File Format requires 0x000000 in the hint track header.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 947ec47d8f..6b0df81f76 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4262,6 +4262,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
if (mov->mode == MODE_MOV)
flags |= MOV_TKHD_FLAG_IN_POSTER;
+ /* QuickTime hint tracks are not part of the movie, preview or poster */
+ if (mov->mode == MODE_MOV && track->tag == MKTAG('r','t','p',' '))
+ flags = 0;
if (track->flags & MOV_TRACK_ENABLED)
flags |= MOV_TKHD_FLAG_ENABLED;
diff --git a/tests/ref/lavf/mov_rtphint b/tests/ref/lavf/mov_rtphint
index 0da0e4a935..a2d18d5d70 100644
--- a/tests/ref/lavf/mov_rtphint
+++ b/tests/ref/lavf/mov_rtphint
@@ -1,3 +1,3 @@
-1efbb2419e7c4521bfe43f1c869aba38 *tests/data/lavf/lavf.mov_rtphint
+c9242a7a0f894d76272fc4b97f346f51 *tests/data/lavf/lavf.mov_rtphint
365761 tests/data/lavf/lavf.mov_rtphint
tests/data/lavf/lavf.mov_rtphint CRC=0xbb2b949b