summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 9d515b2012..603b264f60 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -572,8 +572,11 @@ static void check_previous_track_selection(struct MPContext *mpctx)
// defaults are -1 (default selection), or -2 (off) for secondary tracks.
for (int t = 0; t < STREAM_TYPE_COUNT; t++) {
for (int i = 0; i < NUM_PTRACKS; i++) {
- if (opts->stream_id[i][t] >= 0)
+ if (opts->stream_id[i][t] >= 0) {
opts->stream_id[i][t] = i == 0 ? -1 : -2;
+ m_config_notify_change_opt_ptr(mpctx->mconfig,
+ &opts->stream_id[i][t]);
+ }
}
}
talloc_free(mpctx->track_layout_hash);
@@ -590,8 +593,11 @@ void mp_switch_track_n(struct MPContext *mpctx, int order, enum stream_type type
// Mark the current track selection as explicitly user-requested. (This is
// different from auto-selection or disabling a track due to errors.)
- if (flags & FLAG_MARK_SELECTION)
+ if (flags & FLAG_MARK_SELECTION) {
mpctx->opts->stream_id[order][type] = track ? track->user_tid : -2;
+ m_config_notify_change_opt_ptr(mpctx->mconfig,
+ &mpctx->opts->stream_id[order][type]);
+ }
// No decoder should be initialized yet.
if (!mpctx->demuxer)
@@ -1623,8 +1629,10 @@ terminate_playback:
process_hooks(mpctx, "on_unload");
- if (mpctx->step_frames)
+ if (mpctx->step_frames) {
opts->pause = 1;
+ m_config_notify_change_opt_ptr(mpctx->mconfig, &opts->pause);
+ }
close_recorder(mpctx);
@@ -1730,8 +1738,11 @@ struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
if (mpctx->opts->shuffle)
playlist_shuffle(mpctx->playlist);
next = mpctx->playlist->first;
- if (next && mpctx->opts->loop_times > 1)
+ if (next && mpctx->opts->loop_times > 1) {
mpctx->opts->loop_times--;
+ m_config_notify_change_opt_ptr(mpctx->mconfig,
+ &mpctx->opts->loop_times);
+ }
} else {
next = mpctx->playlist->last;
// Don't jump to files that would immediately go to next file anyway
@@ -1852,7 +1863,7 @@ void close_recorder_and_error(struct MPContext *mpctx)
close_recorder(mpctx);
talloc_free(mpctx->opts->record_file);
mpctx->opts->record_file = NULL;
- mp_notify_property(mpctx, "record-file");
+ m_config_notify_change_opt_ptr(mpctx->mconfig, &mpctx->opts->record_file);
MP_ERR(mpctx, "Disabling stream recording.\n");
}