summaryrefslogtreecommitdiffstats
path: root/libavcodec/avrndec.c
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-11-05 18:24:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-19 00:42:39 +0100
commitade9960fc6f8e324c126ab4a86f2b29b3d97a674 (patch)
tree438671ff95602886c544bddf49edefa4f110b278 /libavcodec/avrndec.c
parente8fed4d3314cdf0cf4134844a1acf5798b205cb8 (diff)
downloadffmpeg-streaming-ade9960fc6f8e324c126ab4a86f2b29b3d97a674.zip
ffmpeg-streaming-ade9960fc6f8e324c126ab4a86f2b29b3d97a674.tar.gz
avrndec: support lowres for mjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avrndec.c')
-rw-r--r--libavcodec/avrndec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
index 361b668..2fa369c 100644
--- a/libavcodec/avrndec.c
+++ b/libavcodec/avrndec.c
@@ -38,6 +38,11 @@ static av_cold int init(AVCodecContext *avctx)
// Support "Resolution 1:1" for Avid AVI Codec
a->is_mjpeg = avctx->extradata_size < 31 || memcmp(&avctx->extradata[28], "1:1", 3);
+ if(!a->is_mjpeg && avctx->lowres) {
+ av_log(avctx, AV_LOG_ERROR, "lowres is not possible with rawvideo\n");
+ return AVERROR(EINVAL);
+ }
+
if(a->is_mjpeg)
return ff_mjpeg_decode_init(avctx);
@@ -129,5 +134,6 @@ AVCodec ff_avrn_decoder = {
.decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"),
.capabilities = CODEC_CAP_DR1,
+ .max_lowres = 3,
};
OpenPOWER on IntegriCloud