]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v210dec.c
timecode: fix typo
[ffmpeg] / libavcodec / v210dec.c
index 68dbd3753a4553db75b05bd3b906284e0770c186..1af7f943e13107a69999bd32113823f749e0d615 100644 (file)
@@ -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},