[FFmpeg-devel] [PATCH] avrndec: support lowres for mjpeg

Paul B Mahol onemda at gmail.com
Mon Nov 5 18:12:06 CET 2012


On 11/5/12, Piotr Bandurski <ami_stuff at o2.pl> wrote:
> diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
> index 207b797..0242a83 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 -1;

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


More information about the ffmpeg-devel mailing list