ffmpeg | branch: release/4.4 | Andreas Rheinhardt 
<[email protected]> | Mon Sep  6 02:47:48 2021 +0200| 
[91b06840247273755630e75f76b9931467847ee8] | committer: Andreas Rheinhardt

avformat/tee: Fix leak of FIFO-options dictionary

Happened for all slaves which didn't use the FIFO.

Signed-off-by: Andreas Rheinhardt <[email protected]>
(cherry picked from commit 3a27fcb168af07f168e58577f6b3696a8fe74803)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91b06840247273755630e75f76b9931467847ee8
---

 libavformat/tee.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index c04706ce9a..6fafc0a99d 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -124,6 +124,7 @@ static int close_slave(TeeSlave *tee_slave)
     unsigned i;
     int ret = 0;
 
+    av_dict_free(&tee_slave->fifo_options);
     avf = tee_slave->avf;
     if (!avf)
         return 0;
@@ -229,6 +230,7 @@ static int open_slave(AVFormatContext *avf, char *slave, 
TeeSlave *tee_slave)
 
         av_dict_free(&options);
         options = tee_slave->fifo_options;
+        tee_slave->fifo_options = NULL;
     }
     ret = avformat_alloc_output_context2(&avf2, NULL,
                                          tee_slave->use_fifo ? "fifo" :format, 
filename);

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

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

Reply via email to