diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-08-25 19:21:21 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-31 17:37:42 +0000 |
commit | f3f1a79fe3ad9bdae344559ec5802c184af41112 (patch) | |
tree | 8ad67cec885e18f6d0618dc9b220288574e1e98f /player/command.c | |
parent | f3211db7911c89883dc392ddeef8ffe53aeb49b0 (diff) | |
download | mpv-f3f1a79fe3ad9bdae344559ec5802c184af41112.tar.bz2 mpv-f3f1a79fe3ad9bdae344559ec5802c184af41112.tar.xz |
vo: add --video-crop
Just cropping by VO that works with hwdec.
Fixes: #12222
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 55928eb2cd..55b0dd9449 100644 --- a/player/command.c +++ b/player/command.c @@ -2325,7 +2325,13 @@ static struct mp_image_params get_video_out_params(struct MPContext *mpctx) if (!mpctx->vo_chain) return (struct mp_image_params){0}; - return mpctx->vo_chain->filter->output_params; + struct mp_image_params o_params = mpctx->vo_chain->filter->output_params; + if (mpctx->video_out) { + m_rect_apply(&o_params.crop, o_params.w, o_params.h, + &mpctx->video_out->opts->video_crop); + } + + return o_params; } static int mp_property_vo_imgparams(void *ctx, struct m_property *prop, |