diff mbox series

[FFmpeg-devel,16/21] avformat/aqtitledec: Fix memleak when queueing subtitle fails

Message ID 20200322034756.29907-16-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


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 would leak in this scenario. This has been fixed by
adding the FF_INPUTFORMAT_HEADER_CLEANUP flag so that aqt_read_close() is
called if reading the header fails.

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


diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c
index 8cc82a8f39..191a31b2f1 100644
--- a/libavformat/aqtitledec.c
+++ b/libavformat/aqtitledec.c
@@ -145,4 +145,5 @@  AVInputFormat ff_aqtitle_demuxer = {
     .read_close     = aqt_read_close,
     .extensions     = "aqt",
     .priv_class     = &aqt_class,
+    .flags_internal = FF_INPUTFORMAT_HEADER_CLEANUP,