summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/csputils.h2
-rw-r--r--video/decode/vd_lavc.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/video/csputils.h b/video/csputils.h
index b84a4a3544..a082682e43 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -203,6 +203,8 @@ enum mp_csp_levels avcol_range_to_mp_csp_levels(int avrange);
enum mp_csp_prim avcol_pri_to_mp_csp_prim(int avpri);
+enum mp_csp_trc avcol_trc_to_mp_csp_trc(int avtrc);
+
int mp_csp_to_avcol_spc(enum mp_csp colorspace);
int mp_csp_levels_to_avcol_range(enum mp_csp_levels range);
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 9e0a778990..e32ff6b01e 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -477,6 +477,7 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame,
.colorspace = avcol_spc_to_mp_csp(ctx->avctx->colorspace),
.colorlevels = avcol_range_to_mp_csp_levels(ctx->avctx->color_range),
.primaries = avcol_pri_to_mp_csp_prim(ctx->avctx->color_primaries),
+ .gamma = avcol_trc_to_mp_csp_trc(ctx->avctx->color_trc),
.chroma_location =
avchroma_location_to_mp(ctx->avctx->chroma_sample_location),
.rotate = vd->header->video->rotate,