[FFmpeg-cvslog] ffprobe: Fix memory leak

Derek Buitenhuis git at videolan.org
Fri Jun 21 18:42:05 EEST 2019


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Fri Jun 21 14:34:45 2019 +0100| [d5a6b390ced64cfd33764930f8b1d3c6437a43b6] | committer: Derek Buitenhuis

ffprobe: Fix memory leak

This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

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

 fftools/ffprobe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 3becb6330e..5aaddb0308 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2429,9 +2429,7 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
         }
         av_packet_unref(&pkt);
     }
-    av_init_packet(&pkt);
-    pkt.data = NULL;
-    pkt.size = 0;
+    av_packet_unref(&pkt);
     //Flush remaining frames that are cached in the decoder
     for (i = 0; i < fmt_ctx->nb_streams; i++) {
         pkt.stream_index = i;



More information about the ffmpeg-cvslog mailing list