[FFmpeg-cvslog] rv34: Check the return value from ff_rv34_decode_init

Martin Storsjö git at videolan.org
Thu Jan 16 21:57:39 CET 2014


ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Mon Sep 16 16:01:02 2013 +0300| [f0db793bee82a73bbdaab824f02e8dd081a5d87b] | committer: Luca Barbato

rv34: Check the return value from ff_rv34_decode_init

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 711c970168297683860422e95d6b7e37ee3c8367)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 20c8f176293e7520c6205b664e25ecf8a711253e)

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

 libavcodec/rv30.c |    4 +++-
 libavcodec/rv40.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 4828e98..7b280f4 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -244,9 +244,11 @@ static void rv30_loop_filter(RV34DecContext *r, int row)
 static av_cold int rv30_decode_init(AVCodecContext *avctx)
 {
     RV34DecContext *r = avctx->priv_data;
+    int ret;
 
     r->rv30 = 1;
-    ff_rv34_decode_init(avctx);
+    if ((ret = ff_rv34_decode_init(avctx)) < 0)
+        return ret;
     if(avctx->extradata_size < 2){
         av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
         return -1;
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 3f2a824..1d586d8 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -541,9 +541,11 @@ static void rv40_loop_filter(RV34DecContext *r, int row)
 static av_cold int rv40_decode_init(AVCodecContext *avctx)
 {
     RV34DecContext *r = avctx->priv_data;
+    int ret;
 
     r->rv30 = 0;
-    ff_rv34_decode_init(avctx);
+    if ((ret = ff_rv34_decode_init(avctx)) < 0)
+        return ret;
     if(!aic_top_vlc.bits)
         rv40_init_tables();
     r->parse_slice_header = rv40_parse_slice_header;



More information about the ffmpeg-cvslog mailing list