mirror of https://github.com/mpv-player/mpv
vd_lavc: use AVFrame fields directly instead of AVCodecContext
Conceptually cleaner, although the API claims this is equivalent. Originally, AVCodecContext fields were used, because not all supported libavcodec/libavutil versions had the AVFrame fields. This is not done for chroma_sample_location - it has no AVFrame field.
This commit is contained in:
parent
b1c0bbe8b8
commit
17d6ba7f77
|
@ -638,10 +638,10 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame,
|
|||
.p_w = frame->sample_aspect_ratio.num,
|
||||
.p_h = frame->sample_aspect_ratio.den,
|
||||
.color = {
|
||||
.space = avcol_spc_to_mp_csp(ctx->avctx->colorspace),
|
||||
.levels = 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),
|
||||
.space = avcol_spc_to_mp_csp(frame->colorspace),
|
||||
.levels = avcol_range_to_mp_csp_levels(frame->color_range),
|
||||
.primaries = avcol_pri_to_mp_csp_prim(frame->color_primaries),
|
||||
.gamma = avcol_trc_to_mp_csp_trc(frame->color_trc),
|
||||
.sig_peak = ctx->cached_hdr_peak,
|
||||
},
|
||||
.chroma_location =
|
||||
|
|
Loading…
Reference in New Issue