aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-07 01:14:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-07 01:21:43 +0200
commitcaa7a494817f6f28305b8581cf4f7e8ecf1ae85c (patch)
tree0987f8e24b4f201623841d0ddfa73cf22feca88d
parenta68b6ec7f55ec9a35848fb70ca6edfded174bbb3 (diff)
downloadffmpeg-caa7a494817f6f28305b8581cf4f7e8ecf1ae85c.tar.gz
avformat/utils: fix memleak with nobuffer
Fixes Ticket2802 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f9edcca348..727711b529 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2783,9 +2783,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
break;
}
- if (ic->flags & AVFMT_FLAG_NOBUFFER) {
- pkt = &pkt1;
- } else {
+ if (ic->flags & AVFMT_FLAG_NOBUFFER)
+ free_packet_buffer(&ic->packet_buffer, &ic->packet_buffer_end);
+ {
pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1,
&ic->packet_buffer_end);
if (!pkt) {