From fee45c01703ace0d6af7b8fe60d151be245a0e3f Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Nov 2015 17:53:05 +0100 Subject: 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. --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3