[FFmpeg-cvslog] avformat/tee: Fix leak of FIFO-options dictionary

Andreas Rheinhardt git at videolan.org
Sun Oct 3 23:49:19 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Sep  6 02:47:48 2021 +0200| [3a27fcb168af07f168e58577f6b3696a8fe74803] | 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 <andreas.rheinhardt at outlook.com>

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

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

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 050c96d326..b358fc2f06 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -125,6 +125,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;
@@ -230,6 +231,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);



More information about the ffmpeg-cvslog mailing list