]> git.sesse.net Git - ffmpeg/commit
avformat: call AVOutputFormat->deinit() when freeing the context
authorJames Almer <jamrial@gmail.com>
Sat, 19 Oct 2019 02:23:32 +0000 (23:23 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 21 Oct 2019 20:20:20 +0000 (17:20 -0300)
commit02cf2391966afb68269f0cd4d9ce876dc48ec66f
tree5e65401a7aa11fd89865e8a7b7b2c3604b0289d7
parent27bae5aacafed376350533e7cde2b396b589a15c
avformat: call AVOutputFormat->deinit() when freeing the context

Despite the doxy stating that it's called when the muxer is destroyed,
this was not true in practice. It's only called by av_write_trailer()
and on init() failure.

An AVFormatContext may be closed without writing the trailer if errors
ocurred while muxing packets, so in order to prevent memory leaks, it
should effectively be called when freeing the muxer.

Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/mux.c
libavformat/utils.c