aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-08-11 20:35:40 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-10-16 23:05:51 +0200
commit4a11d773f9f7e9c21416264c30d4a260d1dc49a6 (patch)
tree3af2e0d93d94e5c05f0c2908b8c65a7d5b3d24d1
parentabb41f19cc10fea09fb16d9ecc9967b2a78cf7b0 (diff)
downloadffmpeg-4a11d773f9f7e9c21416264c30d4a260d1dc49a6.tar.gz
nuv: check rtjpeg_decode_frame_yuv420 return value
CC: libav-stable@libav.org (cherry picked from commit 85ac12587bfef970d0e0e4abc292df346daf8478) Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Conflicts: libavcodec/nuv.c
-rw-r--r--libavcodec/nuv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index ea5e9ee042..1c07089a07 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: {