[FFmpeg-devel] [PATCH] v410dec: Implement explode mode support

Paul B Mahol onemda at gmail.com
Mon Jul 23 18:00:51 CEST 2012


On 7/23/12, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
> Try and decode broken files, but still fail if explode
> mode is enabled.
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  libavcodec/v410dec.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
> index 10d7305..3612705 100644
> --- a/libavcodec/v410dec.c
> +++ b/libavcodec/v410dec.c
> @@ -29,7 +29,12 @@ static av_cold int v410_decode_init(AVCodecContext
> *avctx)
>      avctx->bits_per_raw_sample = 10;
>
>      if (avctx->width & 1) {
> -        av_log(avctx, AV_LOG_WARNING, "v410 requires width to be
> even.\n");
> +        if (avctx->err_recognition & AV_EF_EXPLODE) {

AV_EF_COMPLIANT ?

> +            av_log(avctx, AV_LOG_ERROR, "v410 requires width to be
> even.\n");
> +            return AVERROR_INVALIDDATA;
> +        } else {
> +            av_log(avctx, AV_LOG_WARNING, "v410 requires width to be
> even.\n");
> +        }
>      }
>
>      avctx->coded_frame = avcodec_alloc_frame();
> --
> 1.7.10.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list