Commit 8161ac29 authored by Gyan Doshi's avatar Gyan Doshi

lavf/movenc: fix tmcd writing for non-MP4/MOV modes

write_tmcd allows tmcd track to be created with any mode but in
mov_write_header, index for first tmcd track is only set for modes
MP4 or MOV, causing a crash if tmcd creation is attempted with other
modes.
parent b131a07e
......@@ -6381,7 +6381,7 @@ static int mov_write_header(AVFormatContext *s)
nb_tracks++;
}
if (mov->mode == MODE_MOV || mov->mode == MODE_MP4)
if (mov->nb_meta_tmcd)
tmcd_track = nb_tracks;
for (i = 0; i < s->nb_streams; i++) {
......
......@@ -34,7 +34,7 @@ fate-lavf-flm: CMD = lavf_container "" "-pix_fmt rgba"
fate-lavf-gxf: CMD = lavf_container "-ar 48000" "-r 25 -s pal -ac 1 -threads 1"
fate-lavf-gxf_pal: CMD = lavf_container_timecode_nodrop "-ar 48000 -r 25 -s pal -ac 1 -threads 1 -f gxf"
fate-lavf-gxf_ntsc: CMD = lavf_container_timecode_drop "-ar 48000 -s ntsc -ac 1 -threads 1 -f gxf"
fate-lavf-ismv: CMD = lavf_container_timecode "-an -c:v mpeg4 -threads 1"
fate-lavf-ismv: CMD = lavf_container_timecode "-an -write_tmcd 1 -c:v mpeg4 -threads 1"
fate-lavf-mkv: CMD = lavf_container "" "-c:a mp2 -c:v mpeg4 -ar 44100 -threads 1"
fate-lavf-mkv_attachment: CMD = lavf_container_attach "-c:a mp2 -c:v mpeg4 -threads 1 -f matroska"
fate-lavf-mov: CMD = lavf_container_timecode "-movflags +faststart -c:a pcm_alaw -c:v mpeg4 -threads 1"
......
96053075a3f60d271131fe2d0765c267 *tests/data/lavf/lavf.ismv
312542 tests/data/lavf/lavf.ismv
bd88b50defa57766619c092ea89f25a6 *tests/data/lavf/lavf.ismv
313165 tests/data/lavf/lavf.ismv
tests/data/lavf/lavf.ismv CRC=0x9d9a638a
7022701b4c693bc4ffe1e9f96dd82a02 *tests/data/lavf/lavf.ismv
321448 tests/data/lavf/lavf.ismv
805a2557bf952c84835f3c10b6893e15 *tests/data/lavf/lavf.ismv
322071 tests/data/lavf/lavf.ismv
tests/data/lavf/lavf.ismv CRC=0xe8130120
96053075a3f60d271131fe2d0765c267 *tests/data/lavf/lavf.ismv
312542 tests/data/lavf/lavf.ismv
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment