mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 10:52:20 +00:00
smvjpegdec: No frame at all is an error
This fixes a infinite loop Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b94f045b18
commit
9e9ec5ad2a
@ -137,6 +137,8 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz
|
||||
/* Are we at the start of a block? */
|
||||
if (!cur_frame)
|
||||
ret = avcodec_decode_video2(s->avctx, mjpeg_data, &s->mjpeg_data_size, avpkt);
|
||||
else if (!s->mjpeg_data_size)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
|
||||
if (desc && mjpeg_data->height % (s->frames_per_jpeg << desc->log2_chroma_h)) {
|
||||
|
Loading…
Reference in New Issue
Block a user