summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/dec_video.c7
-rw-r--r--video/decode/vd_lavc.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 51f959ff6d..02fa334e2b 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -236,6 +236,13 @@ static void fix_image_params(struct dec_video *d_video,
if (p.p_w <= 0 || p.p_h <= 0)
p.p_w = p.p_h = 1;
+ if (opts->video_rotate < 0) {
+ p.rotate = 0;
+ } else {
+ p.rotate = (p.rotate + opts->video_rotate) % 360;
+ }
+ p.stereo_out = opts->video_stereo_mode;
+
// Detect colorspace from resolution.
mp_image_params_guess_csp(&p);
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,