From 23639e5b0ea5d4af50a2d5aedef11cd240e2390c Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 20 Sep 2016 15:38:19 +0200 Subject: video: handle override video parameters in a better place This really shouldn't be in vd_lavc.c - move it to dec_video.c, where it also applies aspect overrides. This makes all overrides in one place. The previous commit contains some required changes for resetting the image parameters change detection (i.e. it's not done only on video aspect override changes). --- video/decode/vd_lavc.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index d8a8b320b0..6328f5fe49 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -592,7 +592,6 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame, struct mp_image_params *out_params) { vd_ffmpeg_ctx *ctx = vd->priv; - struct MPOpts *opts = ctx->opts; #if HAVE_AVUTIL_MASTERING_METADATA // Get the reference peak (for HDR) if available. This is cached into ctx @@ -632,13 +631,6 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame, .rotate = vd->codec->rotate, .stereo_in = vd->codec->stereo_mode, }; - - if (opts->video_rotate < 0) { - out_params->rotate = 0; - } else { - out_params->rotate = (out_params->rotate + opts->video_rotate) % 360; - } - out_params->stereo_out = opts->video_stereo_mode; } static enum AVPixelFormat get_format_hwdec(struct AVCodecContext *avctx, -- cgit v1.2.3