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
..
2025-03-28 14:33:07 -03:00
2025-05-20 21:17:28 +08:00
2025-05-09 12:17:09 -04:00
2025-04-27 23:00:02 +02:00
2025-04-25 23:22:20 +02:00
2025-04-13 22:49:21 +02:00
2025-04-13 22:49:21 +02:00
2025-05-03 07:57:15 +02:00
2025-05-15 01:20:46 +02:00
2025-03-28 14:33:07 -03:00
2025-03-28 14:33:07 -03:00
2025-05-21 02:43:08 +02:00
2025-05-15 03:03:54 +02:00
2025-03-25 20:59:18 -03:00
2025-03-25 20:59:18 -03:00
2025-04-27 15:52:30 +01:00
2025-05-07 15:35:47 +02:00
2025-04-22 20:45:57 +02:00
2025-01-17 23:33:27 +01:00
2025-04-22 20:45:57 +02:00
2025-03-28 14:33:07 -03:00
2025-05-31 00:08:25 +02:00
2025-05-22 16:11:16 +01:00
2025-05-03 07:56:04 +02:00
2025-04-16 13:09:02 +02:00
2025-04-25 23:22:20 +02:00
2025-01-18 21:57:02 +01:00
2025-03-28 14:33:08 -03:00
2025-01-07 18:38:11 +01:00
2025-02-26 14:52:34 +01:00
2025-05-12 13:03:18 +08:00
2025-03-28 14:33:07 -03:00
2025-04-29 15:25:46 +08:00
2025-05-14 10:32:23 -03:00
2025-02-07 19:44:13 -03:00
2025-02-07 19:44:13 -03:00
2025-04-14 17:25:34 -03:00
2025-05-13 00:26:24 +02:00
2025-04-16 13:09:05 +02:00
2025-05-09 22:27:04 +02:00
2025-03-28 14:33:08 -03:00
2025-04-25 23:22:20 +02:00
2025-05-15 03:03:55 +02:00
2025-05-23 00:43:32 +02:00
2025-03-28 14:33:08 -03:00
2025-01-07 17:47:15 -05:00
2025-04-25 23:22:20 +02:00
2025-03-22 03:35:28 +01:00
2025-03-04 17:01:58 +08:00
2025-02-07 19:44:13 -03:00
2025-03-22 03:35:28 +01:00
2025-02-26 14:52:34 +01:00
2025-05-22 22:10:46 +02:00
2025-05-28 02:09:28 +02:00
2025-05-27 22:07:35 +02:00
2025-05-28 02:42:36 +02:00
2025-04-07 01:02:41 +02:00
2025-02-16 15:41:41 +01:00
2025-04-25 23:22:20 +02:00
2025-05-15 03:03:55 +02:00
2025-06-01 16:36:54 +08:00
2025-03-25 20:59:18 -03:00
2025-03-25 20:59:18 -03:00
2025-02-26 14:52:34 +01:00
2025-04-25 23:22:20 +02:00
2025-03-10 04:51:57 +01:00
2025-05-18 08:57:31 -06:00
2025-03-28 14:33:07 -03:00
2025-03-28 14:33:08 -03:00
2025-03-28 14:33:07 -03:00
2025-04-25 23:22:20 +02:00
2025-03-05 00:24:54 +01:00
2025-03-28 15:23:28 +01:00
2025-05-30 22:07:10 +02:00
2025-05-30 22:07:11 +02:00
2025-03-28 14:33:07 -03:00
2025-05-19 07:24:05 +02:00
2025-05-19 07:24:05 +02:00
2025-05-31 03:18:26 +02:00
2025-03-28 14:33:07 -03:00
2025-03-28 14:33:07 -03:00
2025-03-22 03:35:28 +01:00
2025-04-25 23:22:20 +02:00
2025-03-12 17:00:24 +01:00
2025-03-04 02:07:01 +01:00
2025-03-04 02:07:01 +01:00
2025-04-25 23:22:20 +02:00
2025-02-26 14:52:34 +01:00
2025-03-04 15:34:38 +01:00
2025-04-03 16:08:41 +02:00
2025-05-22 22:10:46 +02:00
2025-04-22 21:09:10 +02:00
2025-05-22 22:11:37 +02:00
2025-05-22 22:11:37 +02:00
2025-02-26 12:32:22 -05:00
2025-03-31 08:04:05 +02:00
2025-02-26 12:32:22 -05:00
2025-01-10 12:09:27 +02:00
2025-02-26 12:32:22 -05:00
2025-03-28 14:33:07 -03:00
2025-03-10 04:51:57 +01:00
2025-04-25 23:22:20 +02:00
2025-03-28 14:33:07 -03:00
2025-02-07 10:13:50 -05:00
2025-03-22 03:35:28 +01:00
2025-03-28 14:33:08 -03:00
2025-03-28 14:44:34 -03:00
2025-04-27 15:52:30 +01:00
2025-04-25 23:22:20 +02:00
2025-04-25 23:22:20 +02:00
2025-05-12 11:07:35 +02:00
2025-05-11 18:41:55 +02:00
2025-03-14 02:03:59 +01:00
2025-04-25 23:22:20 +02:00
2025-01-12 11:07:57 +11:00