diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-08-11 20:35:40 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-16 23:05:51 +0200 |
commit | 4a11d773f9f7e9c21416264c30d4a260d1dc49a6 (patch) | |
tree | 3af2e0d93d94e5c05f0c2908b8c65a7d5b3d24d1 | |
parent | abb41f19cc10fea09fb16d9ecc9967b2a78cf7b0 (diff) | |
download | ffmpeg-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.c | 5 |
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: { |