diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-08-11 20:35:40 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-09-07 11:11:52 +0200 |
commit | 85ac12587bfef970d0e0e4abc292df346daf8478 (patch) | |
tree | 947cdca759aa2639ac7898b9054afc0ecccdb09e | |
parent | c16ddcc90b8be8d72efea3cc262c7354053916bc (diff) | |
download | ffmpeg-85ac12587bfef970d0e0e4abc292df346daf8478.tar.gz |
nuv: check ff_rtjpeg_decode_frame_yuv420 return value
CC: libav-stable@libav.org
-rw-r--r-- | libavcodec/nuv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 7e265bc025..58a61e4fe2 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -153,7 +153,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, NuvContext *c = avctx->priv_data; AVFrame *picture = data; int orig_size = buf_size; - int keyframe; + int keyframe, ret; int result, init_frame = !avctx->frame_number; enum { NUV_UNCOMPRESSED = '0', @@ -263,7 +263,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } case NUV_RTJPEG_IN_LZO: case NUV_RTJPEG: - ff_rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size); + ret = ff_rtjpeg_decode_frame_yuv420(&c->rtj, &c->pic, buf, buf_size); + if (ret < 0) + return ret; break; case NUV_BLACK: memset(c->pic.data[0], 0, c->width * c->height); |