[FFmpeg-cvslog] nuv: check rtjpeg_decode_frame_yuv420 return value
Luca Barbato
git at videolan.org
Mon Nov 4 19:16:42 CET 2013
ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Sun Aug 11 20:35:40 2013 +0200| [4a11d773f9f7e9c21416264c30d4a260d1dc49a6] | committer: Luca Barbato
nuv: check rtjpeg_decode_frame_yuv420 return value
CC: libav-stable at libav.org
(cherry picked from commit 85ac12587bfef970d0e0e4abc292df346daf8478)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
Conflicts:
libavcodec/nuv.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a11d773f9f7e9c21416264c30d4a260d1dc49a6
---
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: {
More information about the ffmpeg-cvslog
mailing list