diff --git a/playback/src/player.rs b/playback/src/player.rs index 2e47c84c..7d26ecf1 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -495,7 +495,9 @@ impl PlayerInternal { let stream_data_rate = self.stream_data_rate(); if let Some(stream_loader_controller) = self.state.stream_loader_controller() { stream_loader_controller.set_stream_mode(); - if let PlayerState::Playing{..} = self.state { + } + if let PlayerState::Playing{..} = self.state { + if let Some(stream_loader_controller) = self.state.stream_loader_controller() { let wait_for_data_length = (2 * stream_loader_controller.ping_time_ms() * stream_data_rate) / 1000; stream_loader_controller.fetch_next_blocking(wait_for_data_length); }