summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-21 23:34:56 +0200
committerwm4 <wm4@nowhere>2014-10-21 23:34:56 +0200
commit4d5903f9154439e480d9192c2e6dc7dce5ce112f (patch)
tree2d23c0e28e151a349ba3689ddf4c28a76da1ec31 /player/command.c
parentbd315dfaf9c6fc08daaeff2478a43cea668c3dee (diff)
downloadmpv-4d5903f9154439e480d9192c2e6dc7dce5ce112f.tar.bz2
mpv-4d5903f9154439e480d9192c2e6dc7dce5ce112f.tar.xz
command: fix video-rotate update when paused
Due to the way video-rotate currently works, the state will be automatically updated once new video is decoded. So the filter chain doesn't need to be reinitialized automatically, but there is a need to trigger the video instant refresh code path instead. Also move the support function closer to an annoying similar yet different function. They probably can be unified next time major changes are done to this code.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/player/command.c b/player/command.c
index 25e3aa1168..09fb75433a 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2015,6 +2015,16 @@ static int video_refresh_property_helper(struct m_property *prop, int action,
return r;
}
+static int video_simple_refresh_property(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ MPContext *mpctx = ctx;
+ int r = mp_property_generic_option(mpctx, prop, action, arg);
+ if (action == M_PROPERTY_SET && r == M_PROPERTY_OK)
+ mp_force_video_refresh(mpctx);
+ return r;
+}
+
static void append_csp(char **ptr, const char *name, const char *const *names,
int value)
{
@@ -2827,16 +2837,6 @@ static int mp_property_af(void *ctx, struct m_property *prop,
return property_filter(prop, action, arg, ctx, STREAM_AUDIO);
}
-static int property_reinit_vf_helper(void *ctx, struct m_property *prop,
- int action, void *arg)
-{
- MPContext *mpctx = ctx;
- int r = mp_property_generic_option(mpctx, prop, action, arg);
- if (action == M_PROPERTY_SET && r == M_PROPERTY_OK)
- reinit_video_filters(mpctx);
- return r;
-}
-
static int mp_property_alias(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -3078,7 +3078,7 @@ static const struct m_property mp_properties[] = {
{"vf", mp_property_vf},
{"af", mp_property_af},
- {"video-rotate", property_reinit_vf_helper},
+ {"video-rotate", video_simple_refresh_property},
#define PROPERTY_TV_COLOR(name, type) \
{name, mp_property_tv_color, (void *)(intptr_t)type}