summaryrefslogtreecommitdiffstats
path: root/mpvcore/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpvcore/command.c')
-rw-r--r--mpvcore/command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c
index f5421d48fe..b3a1b7a360 100644
--- a/mpvcore/command.c
+++ b/mpvcore/command.c
@@ -1155,10 +1155,13 @@ static void set_deinterlacing(struct MPContext *mpctx, bool enable)
if (!enable)
change_video_filters(mpctx, "del", VF_DEINTERLACE);
} else {
- int arg = enable;
- if (vf->control(vf, VFCTRL_SET_DEINTERLACE, &arg) != CONTROL_OK)
- change_video_filters(mpctx, "add", VF_DEINTERLACE);
+ if ((get_deinterlacing(mpctx) > 0) != enable) {
+ int arg = enable;
+ if (vf->control(vf, VFCTRL_SET_DEINTERLACE, &arg) != CONTROL_OK)
+ change_video_filters(mpctx, "add", VF_DEINTERLACE);
+ }
}
+ mpctx->opts->deinterlace = get_deinterlacing(mpctx) > 0;
}
static int mp_property_deinterlace(m_option_t *prop, int action,