X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fv210dec.c;h=9af9af67972c12fc8d2ad3025e6321da4305e696;hb=3b1d1437a0f3aa4edfed510b1afa0be4ab2589e3;hp=12d5d5407f91a27cdb47a284b10a2042c6351ce2;hpb=f299d8d9f283453cd7671bd174cfdc81503d5e5f;p=ffmpeg diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 12d5d5407f9..9af9af67972 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -53,10 +53,6 @@ static av_cold int decode_init(AVCodecContext *avctx) { V210DecContext *s = avctx->priv_data; - if (avctx->width & 1) { - av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); - return AVERROR_INVALIDDATA; - } avctx->pix_fmt = AV_PIX_FMT_YUV422P10; avctx->bits_per_raw_sample = 10; @@ -141,7 +137,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } psrc += stride; - y += pic->linesize[0] / 2 - avctx->width; + y += pic->linesize[0] / 2 - avctx->width + (avctx->width & 1); u += pic->linesize[1] / 2 - avctx->width / 2; v += pic->linesize[2] / 2 - avctx->width / 2; }