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.
This commit is contained in:
wm4 2015-11-10 17:53:05 +01:00
parent 9a6ec9de2f
commit fee45c0170
1 changed files with 1 additions and 1 deletions

View File

@ -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))