diff options
Diffstat (limited to 'core/command.c')
-rw-r--r-- | core/command.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/core/command.c b/core/command.c index d60c07c7f1..7445ab06d7 100644 --- a/core/command.c +++ b/core/command.c @@ -122,7 +122,7 @@ static int mp_property_generic_option(struct m_option *prop, int action, static int mp_property_playback_speed(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; double orig_speed = opts->playback_speed; switch (action) { case M_PROPERTY_SET: { @@ -437,7 +437,7 @@ static int mp_property_list_chapters(m_option_t *prop, int action, void *arg, static int mp_property_edition(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; struct demuxer *demuxer = mpctx->master_demuxer; if (!demuxer) return M_PROPERTY_UNAVAILABLE; @@ -752,13 +752,13 @@ static int mp_property_audio_delay(m_option_t *prop, int action, { if (!(mpctx->sh_audio && mpctx->sh_video)) return M_PROPERTY_UNAVAILABLE; - float delay = mpctx->opts.audio_delay; + float delay = mpctx->opts->audio_delay; switch (action) { case M_PROPERTY_PRINT: *(char **)arg = format_delay(delay); return M_PROPERTY_OK; case M_PROPERTY_SET: - mpctx->audio_delay = mpctx->opts.audio_delay = *(float *)arg; + mpctx->audio_delay = mpctx->opts->audio_delay = *(float *)arg; mpctx->delay -= mpctx->audio_delay - delay; return M_PROPERTY_OK; } @@ -1139,7 +1139,7 @@ static int mp_property_colormatrix(m_option_t *prop, int action, void *arg, if (action != M_PROPERTY_PRINT) return video_refresh_property_helper(prop, action, arg, mpctx); - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; struct mp_csp_details vo_csp = {0}; if (mpctx->sh_video && mpctx->sh_video->vfilter) @@ -1173,7 +1173,7 @@ static int mp_property_colormatrix_input_range(m_option_t *prop, int action, if (action != M_PROPERTY_PRINT) return video_refresh_property_helper(prop, action, arg, mpctx); - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; struct mp_csp_details vo_csp = {0}; if (mpctx->sh_video && mpctx->sh_video->vfilter) @@ -1213,7 +1213,7 @@ static int mp_property_colormatrix_output_range(m_option_t *prop, int action, return r; } - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; int req = opts->requested_output_range; struct mp_csp_details actual = {0}; @@ -1271,7 +1271,7 @@ static int mp_property_ontop(m_option_t *prop, int action, void *arg, MPContext *mpctx) { return mp_property_vo_flag(prop, action, arg, VOCTRL_ONTOP, - &mpctx->opts.vo.ontop, mpctx); + &mpctx->opts->vo.ontop, mpctx); } /// Show window borders (RW) @@ -1279,7 +1279,7 @@ static int mp_property_border(m_option_t *prop, int action, void *arg, MPContext *mpctx) { return mp_property_vo_flag(prop, action, arg, VOCTRL_BORDER, - &mpctx->opts.vo.border, mpctx); + &mpctx->opts->vo.border, mpctx); } static int mp_property_framedrop(m_option_t *prop, int action, @@ -1295,7 +1295,7 @@ static int mp_property_framedrop(m_option_t *prop, int action, static int mp_property_gamma(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - int *gamma = (int *)((char *)&mpctx->opts + prop->offset); + int *gamma = (int *)((char *)mpctx->opts + prop->offset); int r, val; if (!mpctx->sh_video) @@ -1425,7 +1425,7 @@ static int mp_property_aspect(m_option_t *prop, int action, void *arg, float f = *(float *)arg; if (f < 0.1) f = (float)mpctx->sh_video->disp_w / mpctx->sh_video->disp_h; - mpctx->opts.movie_aspect = f; + mpctx->opts->movie_aspect = f; video_reinit_vo(mpctx->sh_video); return M_PROPERTY_OK; } @@ -1460,7 +1460,7 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, static int mp_property_sub_delay(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; if (!mpctx->sh_video) return M_PROPERTY_UNAVAILABLE; switch (action) { @@ -1474,7 +1474,7 @@ static int mp_property_sub_delay(m_option_t *prop, int action, void *arg, static int mp_property_sub_pos(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; if (!mpctx->sh_video) return M_PROPERTY_UNAVAILABLE; if (action == M_PROPERTY_PRINT) { @@ -1882,7 +1882,7 @@ static struct property_osd_display { static void show_property_osd(MPContext *mpctx, const char *pname, enum mp_on_osd osd_mode) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; struct m_option prop = {0}; struct property_osd_display *p; @@ -1983,7 +1983,7 @@ static bool reinit_filters(MPContext *mpctx, enum stream_type mediatype) static void change_filters(MPContext *mpctx, enum stream_type mediatype, const char *cmd, const char *arg) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; struct m_config *conf = mpctx->mconfig; struct m_obj_settings *old_settings = NULL; bool success = false; @@ -2034,7 +2034,7 @@ static void change_video_filters(MPContext *mpctx, const char *cmd, void run_command(MPContext *mpctx, mp_cmd_t *cmd) { - struct MPOpts *opts = &mpctx->opts; + struct MPOpts *opts = mpctx->opts; sh_video_t *const sh_video = mpctx->sh_video; int osd_duration = opts->osd_duration; bool auto_osd = cmd->on_osd == MP_ON_OSD_AUTO; @@ -2136,7 +2136,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_SPEED_MULT: { float v = cmd->args[0].v.f; - v *= mpctx->opts.playback_speed; + v *= mpctx->opts->playback_speed; mp_property_do("speed", M_PROPERTY_SET, &v, mpctx); show_property_osd(mpctx, "speed", cmd->on_osd); break; |