mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-24 07:46:56 +00:00
movenc: Ensure no separate moof written for empty track
track->mdat_buf can be not NULL while the track is still empty if the last packet write failed. Signed-off-by: Hu Weiwen <sehuww@mail.scut.edu.cn> Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
dbe40478e2
commit
2b77a2f723
@ -5422,7 +5422,7 @@ static int mov_flush_fragment(AVFormatContext *s, int force)
|
||||
duration = track->start_dts + track->track_duration -
|
||||
track->cluster[0].dts;
|
||||
if (mov->flags & FF_MOV_FLAG_SEPARATE_MOOF) {
|
||||
if (!track->mdat_buf)
|
||||
if (!track->entry)
|
||||
continue;
|
||||
mdat_size = avio_tell(track->mdat_buf);
|
||||
moof_tracks = i;
|
||||
|
Loading…
Reference in New Issue
Block a user