summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-29 21:25:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-29 21:25:09 +0200
commita2d5f6b9dbcc81dda68309c96e9c2a227cb37976 (patch)
treeaa916a00e8e20877451001ac4e20c4268ac4ebbd /libavformat/utils.c
parent56c47364c3b50c66c54b3372650f7fd542d998bb (diff)
parent19133e96d30e3f80dbae236ef081aedef419a6bf (diff)
Merge commit '19133e96d30e3f80dbae236ef081aedef419a6bf'
* commit '19133e96d30e3f80dbae236ef081aedef419a6bf': lavf: fix memleaks in avformat_find_stream_info() Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e0e78a78f1..0fd1568206 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3197,6 +3197,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
av_log(ic, AV_LOG_VERBOSE, "max_analyze_duration %"PRId64" reached at %"PRId64" microseconds\n",
max_analyze_duration,
t);
+ if (ic->flags & AVFMT_FLAG_NOBUFFER)
+ av_packet_unref(pkt);
break;
}
if (pkt->duration) {
@@ -3230,6 +3232,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
try_decode_frame(ic, st, pkt,
(options && i < orig_nb_streams) ? &options[i] : NULL);
+ if (ic->flags & AVFMT_FLAG_NOBUFFER)
+ av_packet_unref(pkt);
+
st->codec_info_nb_frames++;
count++;
}