diff options
author | James Almer | 2020-01-26 14:59:07 -0300 |
---|---|---|
committer | James Almer | 2020-01-26 15:30:26 -0300 |
commit | 5e62100152f480e62aba7221096da43069bd2d45 (patch) | |
tree | b573cda859411e090020946ce720ea620ff9c590 | |
parent | 148fb44b369403931e5ad299aefb0e6a4206a0f7 (diff) |
avcodec/av1_parser: export color information
Should fix fate-lavf-fate-av1.mkv failures on builds without an AV1 decoder.
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/av1_parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 131a05fd72..68b7a78abe 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -160,6 +160,11 @@ static int av1_parser_parse(AVCodecParserContext *ctx, } av_assert2(ctx->format != AV_PIX_FMT_NONE); + avctx->colorspace = (enum AVColorSpace) color->matrix_coefficients; + avctx->color_primaries = (enum AVColorPrimaries) color->color_primaries; + avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics; + avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; + if (ctx->width != avctx->width || ctx->height != avctx->height) { ret = ff_set_dimensions(avctx, ctx->width, ctx->height); if (ret < 0) |