summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-10 17:53:05 +0100
committerwm4 <wm4@nowhere>2015-11-10 17:53:05 +0100
commitfee45c01703ace0d6af7b8fe60d151be245a0e3f (patch)
tree252caec4b3aa216f5e47d6e1c6c6cbe136b1401f
parent9a6ec9de2f5e80010ffd81bfba72abb4b02f8b9d (diff)
downloadmpv-fee45c01703ace0d6af7b8fe60d151be245a0e3f.tar.bz2
mpv-fee45c01703ace0d6af7b8fe60d151be245a0e3f.tar.xz
player: silence sporadic error messages on audio init
When the audio format is not known yet and the audio chain is still initializing, filter reinit will fail. Normally, attempts to reinitialize filters at this stage should be rare (e.g. user commands editing the filter chain). But it sometimes happened with track switching in combination with the video code calling update_playback_speed() at arbitrary times. Get rid of the message by not trying to change the filters for the sake of playback speed update while decoding is still being initialized.
-rw-r--r--player/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 0121dfb9e2..c4483a227e 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -148,7 +148,7 @@ void update_playback_speed(struct MPContext *mpctx)
mpctx->audio_speed = mpctx->opts->playback_speed * mpctx->speed_factor_a;
mpctx->video_speed = mpctx->opts->playback_speed * mpctx->speed_factor_v;
- if (!mpctx->d_audio)
+ if (!mpctx->d_audio || mpctx->d_audio->afilter->initialized < 1)
return;
if (!update_speed_filters(mpctx))