mirror of https://git.ffmpeg.org/ffmpeg.git
avprobe: Unref the packet once it is used
Make sure it does not leak packets. CC: libav-stable@libav.org
This commit is contained in:
parent
9cbae3a7d5
commit
f0ca6ffa0a
|
@ -589,8 +589,10 @@ static void show_packets(AVFormatContext *fmt_ctx)
|
||||||
|
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
probe_array_header("packets", 0);
|
probe_array_header("packets", 0);
|
||||||
while (!av_read_frame(fmt_ctx, &pkt))
|
while (!av_read_frame(fmt_ctx, &pkt)) {
|
||||||
show_packet(fmt_ctx, &pkt);
|
show_packet(fmt_ctx, &pkt);
|
||||||
|
av_packet_unref(&pkt);
|
||||||
|
}
|
||||||
probe_array_footer("packets", 0);
|
probe_array_footer("packets", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue