X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fv210dec.c;h=1af7f943e13107a69999bd32113823f749e0d615;hb=c48883163d6c7ff0806687bf3ee33ca9f8e7dede;hp=68dbd3753a4553db75b05bd3b906284e0770c186;hpb=707138593af5c4783035d0b9cc2d7c8cb2137dfa;p=ffmpeg diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 68dbd3753a4..1af7f943e13 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -126,14 +126,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, val = av_le2ne32(*src++); *y++ = val & 0x3FF; - } - if (w < avctx->width - 3) { - *u++ = (val >> 10) & 0x3FF; - *y++ = (val >> 20) & 0x3FF; - - val = av_le2ne32(*src++); - *v++ = val & 0x3FF; - *y++ = (val >> 10) & 0x3FF; + if (w < avctx->width - 3) { + *u++ = (val >> 10) & 0x3FF; + *y++ = (val >> 20) & 0x3FF; + + val = av_le2ne32(*src++); + *v++ = val & 0x3FF; + *y++ = (val >> 10) & 0x3FF; + } } psrc += stride; @@ -158,7 +158,7 @@ static av_cold int decode_close(AVCodecContext *avctx) return 0; } -#define V210DEC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM +#define V210DEC_FLAGS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM static const AVOption v210dec_options[] = { {"custom_stride", "Custom V210 stride", offsetof(V210DecContext, custom_stride), FF_OPT_TYPE_INT, {.dbl = 0}, INT_MIN, INT_MAX, V210DEC_FLAGS},