]> git.sesse.net Git - ffmpeg/commitdiff
ffprobe: Fix memory leak
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 21 Jun 2019 13:34:45 +0000 (14:34 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 21 Jun 2019 14:40:58 +0000 (15:40 +0100)
This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
fftools/ffprobe.c

index 3becb6330e1642953ea72e32cc1c0f861de7177f..5aaddb030895af35532249009d1390963d0bb1ce 100644 (file)
@@ -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;