diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-10-23 12:11:29 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-10-26 20:00:54 +0300 |
commit | f0ca6ffa0ae5d5564516ee7a18aa1e234751444a (patch) | |
tree | e03c1feaa6ba2886a94cd7ade29c52b4b98dda8c /avprobe.c | |
parent | 9cbae3a7d57bd2b862c37fd8123bd1fba680e801 (diff) |
avprobe: Unref the packet once it is used
Make sure it does not leak packets.
CC: libav-stable@libav.org
Diffstat (limited to 'avprobe.c')
-rw-r--r-- | avprobe.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } |