[FFmpeg-devel] [PATCH]Do not fail decoding invalid v410 files
Derek Buitenhuis
derek.buitenhuis at gmail.com
Thu Dec 29 23:45:58 CET 2011
On 29/12/2011 5:37 PM, Carl Eugen Hoyos wrote:
> diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
> index 6ea43ad..4132d36 100644
> --- a/libavcodec/v410dec.c
> +++ b/libavcodec/v410dec.c
> @@ -28,11 +28,6 @@ static av_cold int v410_decode_init(AVCodecContext *avctx)
> avctx->pix_fmt = PIX_FMT_YUV444P10;
> avctx->bits_per_raw_sample = 10;
>
> - if (avctx->width& 1) {
> - av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
> - return AVERROR_INVALIDDATA;
> - }
> -
> avctx->coded_frame = avcodec_alloc_frame();
>
> if (!avctx->coded_frame) {
I am not sure I like this at all. The spec says they HAVE to be
even widths. I don't like the idea of opening the possibility of
side effects simply to support invalid files.
- Derek
More information about the ffmpeg-devel
mailing list