diff options
author | wm4 <wm4@nowhere> | 2013-09-07 20:03:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-07 20:34:49 +0200 |
commit | 8894a4b0d2b38781d9ab110a18e27fef99d956f1 (patch) | |
tree | d63a78e442d69b2acc9d5b9db67de144140ef283 /mpvcore/mplayer.c | |
parent | d77a9244346adadd283a48ee55adebd5f8e37478 (diff) | |
download | mpv-8894a4b0d2b38781d9ab110a18e27fef99d956f1.tar.bz2 mpv-8894a4b0d2b38781d9ab110a18e27fef99d956f1.tar.xz |
command: make options writeable in idle mode
Until now, options could be accessed as properties via "options/name",
but the access was read-only. Change it so that write access is possible
in --idle mode. (All options have to support setting options at that
time, simply because of the way MPlayer designed per-file options.
During playback, normal properties take care of changing things,
including things backed by options.)
This is work in progress. There are some issues: at least setting the
"vf" and "af" options won't work for strange reasons.
Diffstat (limited to 'mpvcore/mplayer.c')
-rw-r--r-- | mpvcore/mplayer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index 2e3751a845..c6eff97338 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -546,6 +546,9 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask) ao_uninit(mpctx->ao, mpctx->stop_play != AT_END_OF_FILE); mpctx->ao = NULL; } + + if (mask & INITIALIZED_PLAYBACK) + mpctx->initialized_flags &= ~INITIALIZED_PLAYBACK; } static MP_NORETURN void exit_player(struct MPContext *mpctx, @@ -4171,6 +4174,7 @@ static void play_current_file(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; + mpctx->initialized_flags |= INITIALIZED_PLAYBACK; mpctx->stop_play = 0; mpctx->filename = NULL; |