diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-03-29 13:09:37 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-03-29 13:09:37 +0200 |
commit | 282ec7289d669e0297ad19ea492e086720e1bdcb (patch) | |
tree | 4cb94b256da365db2732b5abd484b02db3edeb27 /libavcodec | |
parent | 9a0f2b7b3a461703651c78cc0773c31ed81fc553 (diff) | |
download | ffmpeg-282ec7289d669e0297ad19ea492e086720e1bdcb.tar.gz |
Do not try to use lowres for unusual jpg subsampling.
Fixes ticket #1144.
Diffstat (limited to 'libavcodec')
-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 d369518e69..0df0b27137 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -411,6 +411,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id); return -1; } + if ((s->upscale_h || s->upscale_v) && s->avctx->lowres) { + av_log(s->avctx, AV_LOG_ERROR, "lowres not supported for weird subsampling\n"); + return AVERROR_PATCHWELCOME; + } if (s->ls) { s->upscale_h = s->upscale_v = 0; if (s->nb_components > 1) |