From eddc0bfe25bfea9202d43189f5c2447db5a5b9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Mon, 11 Apr 2022 21:32:27 +0300 Subject: vd_lavc: remove duplicate vd_ffmpeg_ctx pointer from init_avctx Seems like in some functions this was called p and in others ctx, and thus it was added as the `p` pointer was not available. --- video/decode/vd_lavc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 9fb7b7cd2a..c45d205f10 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -608,7 +608,6 @@ static void init_avctx(struct mp_filter *vd) vd_ffmpeg_ctx *ctx = vd->priv; struct vd_lavc_params *lavc_param = ctx->opts; struct mp_codec_params *c = ctx->codec; - vd_ffmpeg_ctx *p = vd->priv; m_config_cache_update(ctx->opts_cache); @@ -700,7 +699,7 @@ static void init_avctx(struct mp_filter *vd) av_opt_set(avctx, "x264_build", "150", AV_OPT_SEARCH_CHILDREN); if (ctx->opts->film_grain != 0 /*CPU*/) { - if (p->vo->driver->caps & VO_CAP_FILM_GRAIN) { + if (ctx->vo->driver->caps & VO_CAP_FILM_GRAIN) { avctx->export_side_data |= AV_CODEC_EXPORT_DATA_FILM_GRAIN; } else if (ctx->opts->film_grain == 1 /*GPU*/) { MP_WARN(vd, "GPU film grain requested, but VO does not support " -- cgit v1.2.3