avformat/utils: avformat_find_stream_info set value for ret in case of oom
authorPiotr Bandurski <ami_stuff@o2.pl>
Wed, 10 Jul 2013 12:57:15 +0000 (14:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jul 2013 14:07:45 +0000 (16:07 +0200)
without it FFmpeg didn't display any error message when oom event occured

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index f607be7..bdee644 100644 (file)
@@ -2783,8 +2783,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
         } else {
             pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1,
                                 &ic->packet_buffer_end);
-            if (!pkt)
+            if (!pkt) {
+                ret = AVERROR(ENOMEM);
                 goto find_stream_info_err;
+            }
             if ((ret = av_dup_packet(pkt)) < 0)
                 goto find_stream_info_err;
         }