Commit cdd25f9a authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/smvjpegdec: check avcodec_decode_video2() return code

Fixes CID1271810
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 29446941
......@@ -156,6 +156,10 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz
if (!cur_frame) {
av_frame_unref(mjpeg_data);
ret = avcodec_decode_video2(s->avctx, mjpeg_data, &s->mjpeg_data_size, avpkt);
if (ret < 0) {
s->mjpeg_data_size = 0;
return ret;
}
} else if (!s->mjpeg_data_size)
return AVERROR(EINVAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment