diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-28 18:36:06 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-05 00:49:31 +0200 |
commit | e3b5316bede3cf735f66a0a1b83ca833693ffce7 (patch) | |
tree | e53331f7265054360b087914be2028b0c0015caa /libavformat/movenc.c | |
parent | 432f291dffb0079bf447b1cdb8802a022298510f (diff) | |
download | ffmpeg-e3b5316bede3cf735f66a0a1b83ca833693ffce7.tar.gz |
avformat/movenc: Don't forget to free fragment buffers
The buffers used when fragmented output is enabled have up until now not
been freed in the deinit function; they leak e.g. if one errors out of
mov_write_trailer() before one reaches the point where they are normally
written out and freed. This can e.g. happen if allocating new vos_data
fails at the beginning of mov_write_trailer().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6ed93d89ea..5454a9172c 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6284,9 +6284,11 @@ static void mov_free(AVFormatContext *s) av_freep(&mov->tracks[i].vos_data); ff_mov_cenc_free(&mov->tracks[i].cenc); + ffio_free_dyn_buf(&mov->tracks[i].mdat_buf); } av_freep(&mov->tracks); + ffio_free_dyn_buf(&mov->mdat_buf); } static uint32_t rgb_to_yuv(uint32_t rgb) |