diff options
author | wm4 <wm4@nowhere> | 2019-06-03 02:05:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | 60a0db39aa649fd3f76f6cb7ce53f0f9c3ab6eb4 (patch) | |
tree | 72608364b951ec69e822b7fd39a0e60a5eebc503 /player/video.c | |
parent | 911718c413a80ee5e3bc30a9510b6aaaba35d2ad (diff) | |
download | mpv-60a0db39aa649fd3f76f6cb7ce53f0f9c3ab6eb4.tar.bz2 mpv-60a0db39aa649fd3f76f6cb7ce53f0f9c3ab6eb4.tar.xz |
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.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index dd48e0a529..58115081d1 100644 --- a/player/video.c +++ b/player/video.c @@ -95,8 +95,12 @@ static void vo_chain_reset_state(struct vo_chain *vo_c) void reset_video_state(struct MPContext *mpctx) { - if (mpctx->vo_chain) + if (mpctx->vo_chain) { vo_chain_reset_state(mpctx->vo_chain); + struct track *t = mpctx->vo_chain->track; + if (t && t->dec) + t->dec->play_dir = mpctx->play_dir; + } for (int n = 0; n < mpctx->num_next_frames; n++) mp_image_unrefp(&mpctx->next_frames[n]); |