ffprobe: Fix memory leak

This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2019-06-21 14:34:45 +01:00
parent d70fece560
commit d5a6b390ce
1 changed files with 1 additions and 3 deletions

View 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;