summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-12-22 18:40:17 +0100
committerwm4 <wm4@nowhere>2016-12-22 18:40:32 +0100
commit17d6ba7f776d6fd0ebc7a9881a999299c3fa9471 (patch)
tree0d3f517fb86543e0e03d40f9de53594614b3f25e /video/decode
parentb1c0bbe8b8b9d25c2682f29af66ad243e0072897 (diff)
downloadmpv-17d6ba7f776d6fd0ebc7a9881a999299c3fa9471.tar.bz2
mpv-17d6ba7f776d6fd0ebc7a9881a999299c3fa9471.tar.xz
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.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/vd_lavc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 78d34bbb47..cc3bbc86c7 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -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 =