diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2013-07-10 02:51:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-10 03:42:06 +0200 |
commit | ccf9211e29bdfad02faf93575bf39a8f89c30647 (patch) | |
tree | df9d512ea99d5d853e683333f4d1f373d72af7a4 /libavformat | |
parent | 0574fe76b85706b8ae638ec662070cdd5226b5f2 (diff) | |
download | ffmpeg-ccf9211e29bdfad02faf93575bf39a8f89c30647.tar.gz |
avformat/utils: avformat_find_stream_info fix a crash in case of oom
fixes ticket #2767
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 17dcb259d0..f607be789d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2783,6 +2783,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } else { pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end); + if (!pkt) + goto find_stream_info_err; if ((ret = av_dup_packet(pkt)) < 0) goto find_stream_info_err; } |