Commit 5e621001 authored by James Almer's avatar James Almer

avcodec/av1_parser: export color information

Should fix fate-lavf-fate-av1.mkv failures on builds without an AV1 decoder.
Tested-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 148fb44b
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment