summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-12-20 19:38:54 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-12-20 19:38:54 +0200
commit798a308d97c869538878f842011167a3ec603df4 (patch)
tree238c0746c7fbae81e08c558b700d28bbbd811ff4
parent0afb326035e66663a90c4609f21560ce772e9718 (diff)
downloadmpv-798a308d97c869538878f842011167a3ec603df4.tar.bz2
mpv-798a308d97c869538878f842011167a3ec603df4.tar.xz
core: fix audio-only + framestep weird behavior
Trying to do a framestep while playing an audio-only file would play the file until the end, then start the next file in paused state. Make framestep state enter pause again immediately if there is no video. Also reset framestep state when switching files.
-rw-r--r--mplayer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index bc12eccaf4..e2b8a372d1 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3091,6 +3091,10 @@ static void run_playloop(struct MPContext *mpctx)
if (!mpctx->sh_video) {
mpctx->restart_playback = false;
+ if (mpctx->step_frames) {
+ mpctx->step_frames = 0;
+ pause_player(mpctx);
+ }
// handle audio-only case:
double a_pos = 0;
// sh_audio can be NULL due to video stream switching
@@ -4533,6 +4537,7 @@ if(play_n_frames==0){
mpctx->video_pts = 0;
mpctx->hrseek_active = false;
mpctx->hrseek_framedrop = false;
+ mpctx->step_frames = 0;
mpctx->total_avsync_change = 0;
mpctx->last_chapter_seek = -1;