diff --git a/alvr/client_core/src/connection.rs b/alvr/client_core/src/connection.rs index 5d43be63f5..015b1acb6e 100644 --- a/alvr/client_core/src/connection.rs +++ b/alvr/client_core/src/connection.rs @@ -317,9 +317,6 @@ fn connection_pipeline( stream_corrupted = false; } else if data.had_packet_loss() { stream_corrupted = true; - if let Some(sender) = &mut *CONTROL_SENDER.lock() { - sender.send(&ClientControlPacket::RequestIdr).ok(); - } warn!("Network dropped video packet"); } @@ -332,7 +329,11 @@ fn connection_pipeline( warn!("Dropped video packet. Reason: Decoder saturation") } } else { - warn!("Dropped video packet. Reason: Waiting for IDR frame") + warn!("Dropped video packet. Reason: Waiting for IDR frame"); + + if let Some(sender) = &mut *CONTROL_SENDER.lock() { + sender.send(&ClientControlPacket::RequestIdr).ok(); + } } } });