Commit 4fd1e2e4 authored by Stefano Sabatini's avatar Stefano Sabatini

ffprobe: fix leak in show_packets()

Call av_free_packets() at each demuxing loop iteration, not only when
decoding.

X-ColaCount: +10l
parent 7328c2fc
......@@ -1349,8 +1349,8 @@ static void show_packets(WriterContext *w, AVFormatContext *fmt_ctx)
if (do_show_frames &&
get_video_frame(fmt_ctx, &frame, &pkt)) {
show_frame(w, &frame, fmt_ctx->streams[pkt.stream_index]);
av_free_packet(&pkt);
}
av_free_packet(&pkt);
}
av_init_packet(&pkt);
pkt.data = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment