From: Michael Niedermayer <[email protected]>

Such frames are created by yv12qtcodec from Unthinkable Research

Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/rawdec.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 16ee64e..d421474 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -185,6 +185,14 @@ static int raw_decode(AVCodecContext *avctx,
         || avctx->codec_tag == MKTAG('Y', 'V', 'U', '9'))
         FFSWAP(uint8_t *, picture->data[1], picture->data[2]);
 
+    if (avctx->codec_tag == AV_RL32("I420") &&
+        (avctx->width + 1) * (avctx->height + 1) * 3/2 == buf_size) {
+        picture->data[1] +=  (avctx->width + 1) * (avctx->height + 1) -
+                              avctx->width      *  avctx->height;
+        picture->data[2] += ((avctx->width + 1) * (avctx->height + 1) -
+                              avctx->width      *  avctx->height) * 5 / 4;
+    }
+
     if(avctx->codec_tag == AV_RL32("yuv2") &&
        avctx->pix_fmt   == AV_PIX_FMT_YUYV422) {
         int x, y;
-- 
1.8.0.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to