Module: libav
Branch: release/0.8
Commit: 4a11d773f9f7e9c21416264c30d4a260d1dc49a6

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Sun Aug 11 20:35:40 2013 +0200

nuv: check rtjpeg_decode_frame_yuv420 return value

CC: [email protected]
(cherry picked from commit 85ac12587bfef970d0e0e4abc292df346daf8478)
Signed-off-by: Luca Barbato <[email protected]>

Conflicts:
        libavcodec/nuv.c

---

 libavcodec/nuv.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index ea5e9ee..1c07089 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -145,6 +145,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *data_size,
     int orig_size = buf_size;
     int keyframe;
     int result;
+    int ret;
     enum {NUV_UNCOMPRESSED = '0', NUV_RTJPEG = '1',
           NUV_RTJPEG_IN_LZO = '2', NUV_LZO = '3',
           NUV_BLACK = 'N', NUV_COPY_LAST = 'L'} comptype;
@@ -239,7 +240,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *data_size,
         }
         case NUV_RTJPEG_IN_LZO:
         case NUV_RTJPEG: {
-            rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size);
+            ret = rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size);
+            if (ret < 0)
+                return ret;
             break;
         }
         case NUV_BLACK: {

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to