From 60a0db39aa649fd3f76f6cb7ce53f0f9c3ab6eb4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 3 Jun 2019 02:05:52 +0200 Subject: player: ensure backward playback state is propagated on track switching Track switching doesn't run reset_playback_state(), so a track enabled at runtime during backward playback would lead to a messed up state. This commit just does a bad code monkey fix to this. It feels like there needs to be a much better way to propagate this state. --- player/playloop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index c415e5a90d..7ff82347bd 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -226,10 +226,9 @@ void reset_playback_state(struct MPContext *mpctx) for (int n = 0; n < mpctx->num_tracks; n++) { struct track *t = mpctx->tracks[n]; + // (Often, but not always, this is redundant and also done elsewhere.) if (t->dec) t->dec->play_dir = mpctx->play_dir; - if (t->d_sub) - sub_set_play_dir(t->d_sub, mpctx->play_dir); } mpctx->hrseek_active = false; -- cgit v1.2.3