mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 15:11:09 +08:00
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:
+1
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user