aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-10-23 11:11:29 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-26 18:00:54 +0100
commitf0ca6ffa0ae5d5564516ee7a18aa1e234751444a (patch)
treee03c1feaa6ba2886a94cd7ade29c52b4b98dda8c
parent9cbae3a7d57bd2b862c37fd8123bd1fba680e801 (diff)
downloadffmpeg-f0ca6ffa0ae5d5564516ee7a18aa1e234751444a.tar.gz
avprobe: Unref the packet once it is used
Make sure it does not leak packets. CC: libav-stable@libav.org
-rw-r--r--avprobe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/avprobe.c b/avprobe.c
index a83fa6815d..2ab8ce0a61 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -589,8 +589,10 @@ static void show_packets(AVFormatContext *fmt_ctx)
av_init_packet(&pkt);
probe_array_header("packets", 0);
- while (!av_read_frame(fmt_ctx, &pkt))
+ while (!av_read_frame(fmt_ctx, &pkt)) {
show_packet(fmt_ctx, &pkt);
+ av_packet_unref(&pkt);
+ }
probe_array_footer("packets", 0);
}