diff options
author | Hu Weiwen <sehuww@mail.scut.edu.cn> | 2021-08-12 12:43:54 +0800 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-08-18 13:07:46 +0300 |
commit | 2b77a2f723cd0af441db26dd5ee632af3040e7cb (patch) | |
tree | 09c9fc96a39426dfa9eeb63f97c24be27e63e73f /libavformat | |
parent | dbe40478e293f78c5a5e4302eb3f38257106ee86 (diff) | |
download | ffmpeg-2b77a2f723cd0af441db26dd5ee632af3040e7cb.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index bcc202300b..a460cd9ada 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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; |