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 <[email protected]>
---
 libavformat/microdvddec.c | 1 +
 1 file changed, 1 insertion(+)

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,
 };
-- 
2.20.1

_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to