1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/movenc: Reduce loop iterations in mov_flush_fragment

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili
2025-05-23 12:01:08 +08:00
parent 56cf1c084d
commit 8ea2b993fd

View File

@ -6504,7 +6504,7 @@ static int mov_flush_fragment(AVFormatContext *s, int force)
av_rescale(mov->tracks[first_track].cluster[0].dts, AV_TIME_BASE, mov->tracks[first_track].timescale), av_rescale(mov->tracks[first_track].cluster[0].dts, AV_TIME_BASE, mov->tracks[first_track].timescale),
(has_video ? starts_with_key : mov->tracks[first_track].cluster[0].flags & MOV_SYNC_SAMPLE) ? AVIO_DATA_MARKER_SYNC_POINT : AVIO_DATA_MARKER_BOUNDARY_POINT); (has_video ? starts_with_key : mov->tracks[first_track].cluster[0].flags & MOV_SYNC_SAMPLE) ? AVIO_DATA_MARKER_SYNC_POINT : AVIO_DATA_MARKER_BOUNDARY_POINT);
for (i = 0; i < mov->nb_tracks; i++) { for (i = first_track; i < mov->nb_tracks; i++) {
MOVTrack *track = &mov->tracks[i]; MOVTrack *track = &mov->tracks[i];
int buf_size, write_moof = 1, moof_tracks = -1; int buf_size, write_moof = 1, moof_tracks = -1;
uint8_t *buf; uint8_t *buf;