]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v210dec.c
avformat/avio: Add Metacube support
[ffmpeg] / libavcodec / v210dec.c
index 8483023815da560680e65d34a525d22f4accfd17..868822e298ca745b48338db485e1ea4c43f3718a 100644 (file)
@@ -153,7 +153,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         int aligned_width = ((avctx->width + 47) / 48) * 48;
         stride = aligned_width * 8 / 3;
     }
-    td.stride = stride;
 
     if (avpkt->size < stride * avctx->height) {
         if ((((avctx->width + 23) / 24) * 24 * 8) / 3 * avctx->height == avpkt->size) {
@@ -166,6 +165,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
             return AVERROR_INVALIDDATA;
         }
     }
+    td.stride = stride;
     if (   avctx->codec_tag == MKTAG('C', '2', '1', '0')
         && avpkt->size > 64
         && AV_RN32(psrc) == AV_RN32("INFO")
@@ -214,7 +214,7 @@ static const AVClass v210dec_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-AVCodec ff_v210_decoder = {
+const AVCodec ff_v210_decoder = {
     .name           = "v210",
     .long_name      = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
     .type           = AVMEDIA_TYPE_VIDEO,