diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-09-18 13:28:59 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-20 19:08:19 +0000 |
commit | 20e584f60bdac96ed915151cf0f92d8282c0a0b3 (patch) | |
tree | 4e5185bf2eba0657534324936ff172508222a29f /player | |
parent | 582c7556c697a1efd24c9e71c91ef8c5a77acd0d (diff) | |
download | mpv-20e584f60bdac96ed915151cf0f92d8282c0a0b3.tar.bz2 mpv-20e584f60bdac96ed915151cf0f92d8282c0a0b3.tar.xz |
options: make video-crop validation more strict
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 3 | ||||
-rw-r--r-- | player/video.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c index 6416ba6db3..15177ca67c 100644 --- a/player/command.c +++ b/player/command.c @@ -2338,8 +2338,7 @@ static struct mp_image_params get_video_out_params(struct MPContext *mpctx) struct mp_image_params o_params = mpctx->vo_chain->filter->output_params; if (mpctx->video_out) { struct m_geometry *gm = &mpctx->video_out->opts->video_crop; - if (gm->xy_valid || (gm->wh_valid && (gm->w > 0 || gm->w_per > 0 || - gm->h > 0 || gm->h_per > 0))) + if (gm->xy_valid || (gm->wh_valid && (gm->w > 0 || gm->h > 0))) { m_rect_apply(&o_params.crop, o_params.w, o_params.h, gm); } diff --git a/player/video.c b/player/video.c index 6f5a69bcc7..e4b34b0790 100644 --- a/player/video.c +++ b/player/video.c @@ -1015,8 +1015,7 @@ static void apply_video_crop(struct MPContext *mpctx, struct vo *vo) for (int n = 0; n < mpctx->num_next_frames; n++) { struct m_geometry *gm = &vo->opts->video_crop; struct mp_image_params p = mpctx->next_frames[n]->params; - if (gm->xy_valid || (gm->wh_valid && (gm->w > 0 || gm->w_per > 0 || - gm->h > 0 || gm->h_per > 0))) + if (gm->xy_valid || (gm->wh_valid && (gm->w > 0 || gm->h > 0))) { m_rect_apply(&p.crop, p.w, p.h, gm); } |