Browse Source

avrndec: support lowres for mjpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Piotr Bandurski Michael Niedermayer 13 years ago
parent
commit
ade9960fc6
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavcodec/avrndec.c

+ 6
- 0
libavcodec/avrndec.c View File

@@ -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,
};


Loading…
Cancel
Save