]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/proresdec2: add missing frame color metadata
authorPaul B Mahol <onemda@gmail.com>
Sat, 28 Apr 2018 11:58:05 +0000 (13:58 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 28 Apr 2018 11:58:05 +0000 (13:58 +0200)
Stolen from removed decoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/proresdec2.c

index 35bc3effdbd5376d73cf9f071fb1710204e71320..b4ea6b5e0395e4cecb170aea35c4408bcf2a6d5f 100644 (file)
@@ -117,6 +117,11 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
         avctx->pix_fmt = (buf[12] & 0xC0) == 0xC0 ? AV_PIX_FMT_YUV444P10 : AV_PIX_FMT_YUV422P10;
     }
 
+    avctx->color_primaries = buf[14];
+    avctx->color_trc       = buf[15];
+    avctx->colorspace      = buf[16];
+    avctx->color_range     = AVCOL_RANGE_MPEG;
+
     ptr   = buf + 20;
     flags = buf[19];
     ff_dlog(avctx, "flags %x\n", flags);