From 720d4a5a1a82b2fa2da78dc2a3b1ca6ab87f973c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Mar 2015 12:10:12 +0100 Subject: 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. --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index 79be29a359..96423151e7 100644 --- a/player/audio.c +++ b/player/audio.c @@ -135,7 +135,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); -- cgit v1.2.3