summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-06 12:10:12 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-03-11 12:33:22 +0900
commit1a3a3aba63d079f5364ff8926e9d621a3c58a3f9 (patch)
tree13e338fa601eb852a9b247a0937a5f620d4c80d9
parent0b141eaa82e2c69e7857536b94d1b63ca550db6f (diff)
downloadmpv-1a3a3aba63d079f5364ff8926e9d621a3c58a3f9.tar.bz2
mpv-1a3a3aba63d079f5364ff8926e9d621a3c58a3f9.tar.xz
player: allow changing playback speed in early audio init stages
If the audio decoder was created, but no audio filter chain created yet (still trying to decode a first audio frame), setting the "speed" property could explode. It tried to recreate the filter chain, even though no format was set yet. This is inconvenient and should not happen. (cherry picked from commit 720d4a5a1a82b2fa2da78dc2a3b1ca6ab87f973c)
-rw-r--r--player/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 5e0497c84e..46a552a8a1 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -133,7 +133,7 @@ void set_playback_speed(struct MPContext *mpctx, double new_speed)
opts->playback_speed = new_speed;
- if (!mpctx->d_audio)
+ if (!mpctx->d_audio || mpctx->d_audio->afilter->initialized < 1)
return;
recreate_audio_filters(mpctx);