]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v210dec.c
Merge commit '2eeac79936e83c4495cbe5905064ab797e9b45ff'
[ffmpeg] / libavcodec / v210dec.c
index 99199ddc157a766a0ee826aa81108d152df254d0..ddc5dbe8be6c5608b692683939fc4779b6e5ab28 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/bswap.h"
 #include "libavutil/internal.h"
 #include "libavutil/mem.h"
+#include "libavutil/intreadwrite.h"
 
 #define READ_PIXELS(a, b, c)         \
     do {                             \
@@ -92,6 +93,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
             return AVERROR_INVALIDDATA;
         }
     }
+    if (   avctx->codec_tag == MKTAG('C', '2', '1', '0')
+        && avpkt->size > 64
+        && AV_RN32(psrc) == AV_RN32("INFO")
+        && avpkt->size - 64 >= stride * avctx->height)
+        psrc += 64;
 
     aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf);
     if (aligned_input != s->aligned_input) {