You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
nuv: check ff_rtjpeg_decode_frame_yuv420 return value
CC: libav-stable@libav.org
This commit is contained in:
@@ -153,7 +153,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
NuvContext *c = avctx->priv_data;
|
NuvContext *c = avctx->priv_data;
|
||||||
AVFrame *picture = data;
|
AVFrame *picture = data;
|
||||||
int orig_size = buf_size;
|
int orig_size = buf_size;
|
||||||
int keyframe;
|
int keyframe, ret;
|
||||||
int result, init_frame = !avctx->frame_number;
|
int result, init_frame = !avctx->frame_number;
|
||||||
enum {
|
enum {
|
||||||
NUV_UNCOMPRESSED = '0',
|
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_IN_LZO:
|
||||||
case NUV_RTJPEG:
|
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;
|
break;
|
||||||
case NUV_BLACK:
|
case NUV_BLACK:
|
||||||
memset(c->pic.data[0], 0, c->width * c->height);
|
memset(c->pic.data[0], 0, c->width * c->height);
|
||||||
|
Reference in New Issue
Block a user