Commit 0cd17a62 authored by Michael Niedermayer's avatar Michael Niedermayer

mjpeg: fix crash with lowres and flipped images

Fixes Ticket1155
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c0af8755
......@@ -974,6 +974,10 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
"Can not flip image with CODEC_FLAG_EMU_EDGE set!\n");
s->flipped = 0;
}
if (s->flipped && s->avctx->lowres) {
av_log(s->avctx, AV_LOG_ERROR, "Can not flip image with lowres\n");
s->flipped = 0;
}
for (i = 0; i < nb_components; i++) {
int c = s->comp_index[i];
......
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