[FFmpeg-cvslog] avformat/utils: avformat_find_stream_info set value for ret in case of oom

Piotr Bandurski git at videolan.org
Wed Jul 10 16:47:55 CEST 2013


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 10 14:57:15 2013 +0200| [b0509563347b81d7b0a2474e56abbc9c99043688] | committer: Michael Niedermayer

avformat/utils: avformat_find_stream_info set value for ret in case of oom

without it FFmpeg didn't display any error message when oom event occured

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0509563347b81d7b0a2474e56abbc9c99043688
---

 libavformat/utils.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index f607be7..bdee644 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
         }



More information about the ffmpeg-cvslog mailing list