diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-12 01:29:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-12 02:02:30 +0200 |
commit | 0cd17a6291bdd5e3d89dad2bac96393af92ac9bd (patch) | |
tree | 0ae5fab0efd6858f777229c1e8902be6617bb519 | |
parent | c0af87550a3970606ea298884be928f0710f86ad (diff) | |
download | ffmpeg-0cd17a6291bdd5e3d89dad2bac96393af92ac9bd.tar.gz |
mjpeg: fix crash with lowres and flipped images
Fixes Ticket1155
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mjpegdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index b0f6fdf0fd..c3e69f69e1 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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]; |