summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-09-18 13:28:59 +0200
committerDudemanguy <random342@airmail.cc>2023-09-20 19:08:19 +0000
commit20e584f60bdac96ed915151cf0f92d8282c0a0b3 (patch)
tree4e5185bf2eba0657534324936ff172508222a29f /player/video.c
parent582c7556c697a1efd24c9e71c91ef8c5a77acd0d (diff)
downloadmpv-20e584f60bdac96ed915151cf0f92d8282c0a0b3.tar.bz2
mpv-20e584f60bdac96ed915151cf0f92d8282c0a0b3.tar.xz
options: make video-crop validation more strict
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c3
1 files changed, 1 insertions, 2 deletions
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);
}