FFmpeg/tests
Zhao Zhili 56cf1c084d avformat/movenc: Fix flush fragment
The follow cmd output corrupted file before the patch:

ffmpeg -f lavfi -i color=blue,trim=duration=0.04 \
	-f lavfi -i anullsrc,atrim=duration=2 \
	-movflags +empty_moov+hybrid_fragmented \
	-frag_duration 1000000 \
	-frag_interleave 1 \
	output.mp4

1. first_track is the first track with track->entry != 0. As in the
command above, video track (track index 0) has a single frame. When
flush the second fragment, first_track is 1, the audio track.

2. write_moof = i == first_track, so write_moof is false for i = 0.

3. When mov->frag_interleave != 0, mov->mdat_buf != NULL, because
it contains audio data. So avio_write is called before write_moof,
that is, the data write before moof, and mov_finish_fragment
executed with wrong mdat_start.

4. With normal fmp4 output, the error isn't obvious. With
hybrid_fragmented, ffplay output.mp4 shows a lot of error messages.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:36:54 +08:00
..
api tests/api/api-dump-stream-meta-test: Fix leaks 2025-05-05 17:03:39 +02:00
checkasm avcodec/pixblockdsp: Pass bits_per_raw_sample directly 2025-05-31 01:27:09 +02:00
fate avformat/movenc: Fix flush fragment 2025-06-01 16:36:54 +08:00
filtergraphs fate/libswresample: add a test downmixing with a custom order layout 2025-02-06 13:51:23 -03:00
maps
ref tests: Add fate-hevc-color-reserved 2025-06-01 16:35:23 +08:00
streamgroups avformat/iamf: use the correct layouts for Sound Systems B and C 2025-01-03 10:27:13 -03:00
.gitignore
audiogen.c tests/audiogen: Fix total RIFF chunk size 2024-03-28 11:54:41 +01:00
audiomatch.c
base64.c
copycooker.sh
extended.ffconcat
fate-run.sh tests/fate/probe: add test for pcm misdetected as mp3 in wav 2025-05-16 20:43:58 +02:00
fate-valgrind.supp
fate.sh fate: allow https for git URLs 2024-04-27 23:24:58 +02:00
Makefile Remove libpostproc 2025-05-07 15:35:47 +02:00
md5.sh
refcmp-metadata.awk
reference.pnm
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c