Commit caa7a494 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: fix memleak with nobuffer

Fixes Ticket2802
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a68b6ec7
...@@ -2783,9 +2783,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) ...@@ -2783,9 +2783,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
break; break;
} }
if (ic->flags & AVFMT_FLAG_NOBUFFER) { if (ic->flags & AVFMT_FLAG_NOBUFFER)
pkt = &pkt1; free_packet_buffer(&ic->packet_buffer, &ic->packet_buffer_end);
} else { {
pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1, pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1,
&ic->packet_buffer_end); &ic->packet_buffer_end);
if (!pkt) { if (!pkt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment