[FFmpeg-cvslog] svq3: propagate codec memory allocation failure in context init

Dustin Brody git at videolan.org
Wed Aug 17 00:06:31 CEST 2011


ffmpeg | branch: master | Dustin Brody <libav at parsoma.net> | Fri Aug 12 12:05:46 2011 -0400| [a3e215cdc964fdecf9c5642c2f84ff963e35170a] | committer: Anton Khirnov

svq3: propagate codec memory allocation failure in context init

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/svq3.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index f6f9fc1..3cd95ba 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -924,7 +924,10 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
 
         h->b_stride = 4*s->mb_width;
 
-        ff_h264_alloc_tables(h);
+        if (ff_h264_alloc_tables(h) < 0) {
+            av_log(avctx, AV_LOG_ERROR, "svq3 memory allocation failed\n");
+            return AVERROR(ENOMEM);
+        }
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list