diff mbox series

[FFmpeg-devel,14/21] avformat/microdvddec: Fix memleaks when adding subtitle fails

Message ID 20200322034756.29907-14-andreas.rheinhardt@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,01/21] avformat/nsvdec: Use av_packet_move_ref() for packet ownership transfer | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 22, 2020, 3:47 a.m. UTC
The subtitle queue could leak because microdvd_read_close() would never
be called to clean up the subtitle queue if inserting another subtitle
fails. This has been fixed by setting the FF_INPUTFORMAT_HEADER_CLEANUP
flag.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/microdvddec.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c
index 08e6fca09c..668e317e4b 100644
--- a/libavformat/microdvddec.c
+++ b/libavformat/microdvddec.c
@@ -204,4 +204,5 @@  AVInputFormat ff_microdvd_demuxer = {
     .read_seek2     = microdvd_read_seek,
     .read_close     = microdvd_read_close,
     .priv_class     = &microdvd_class,
+    .flags_internal = FF_INPUTFORMAT_HEADER_CLEANUP,
 };