Conversation
- Add LocalAudioTrackConfig::pcm_queue_capacity (default 60 s) and with_pcm_queue_capacity. The queue grows as needed. An overflow still drops the oldest samples and returns PcmQueueOverflow. - Add LocalAudioTrack::start_pacing and pause_pacing. write_pcm only fills the queue and does not start the pacer. - Start pacing when the publisher PeerConnection is connected and pause it for all other states. Pause it on an ICE restart. Before this change, webrtc-rs dropped audio written before DTLS connected and during reconnects. - Start pacing in gpt_realtime_bot from its OpenAI PeerConnection state.
- Enter the captured runtime when a RemoteTrack is dropped, so a drop on a thread without a runtime does not panic and still unsubscribes. - Reset a dropped join() to Idle and finish a dropped leave(), so the next join() is accepted. - Request 1280x720 when a video or screen-share subscription has no dimension. - Decode Opus into a reused buffer, so a queued frame holds only its samples. - Hold the audio track weakly in the pacer, so the pacer ends when the track is dropped. - Send CallEvent::CallEnded once when the SFU or the coordinator (call.ended) ends the call, then leave the call.
A second audio transceiver failed the SFU negotiation (ParticipantMediaTransportFailure), which forced a REJOIN and made publish_audio return PARTICIPANT_NOT_FOUND. The new track now takes over the sender that stop_publish kept and continues its RTP sequence numbers and timestamps: the SFU drops a stream whose timestamps go back.
|
bugbot review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 972471f. Configure here.
| lifecycle.set_state(CallingState::Idle, &self.core.client_events_tx); | ||
| } | ||
| self.core.lifecycle_changed.notify_waiters(); | ||
| } |
There was a problem hiding this comment.
Dropped join leaves SFU connected
High Severity
JoinAttempt and LeftCall only bump generation and flip CallingState. They never take the installed connection or send SFU leave. A timed-out join after join_once stores the session, or a dropped leave still waiting on that lock, leaves PeerConnections and the SFU participant alive while the handle reports Idle or Left.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 972471f. Configure here.
| } | ||
| } | ||
| previous | ||
| }; |
There was a problem hiding this comment.
Join rebuild loses participant order
Medium Severity
apply_join_call_state_if_current takes the IndexMap and reinserts from the join-response list, so first-seen order does not survive REJOIN. max_subscriptions then keeps a different set of tracks than the participants the call originally learned, which is the rule the new config documents.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 972471f. Configure here.
| if enabled { | ||
| rule.track_types.push(TrackType::Video); | ||
| } | ||
| rule.video_dimension = DEFAULT_VIDEO_DIMENSION; |
There was a problem hiding this comment.
Video toggle clears chosen dimensions
Medium Severity
set_incoming_video_enabled writes video_dimension to DEFAULT_VIDEO_DIMENSION (1920×1080) on every rule, including role filters. Disabling then enabling incoming video discards a configured size such as 640×360 and resubscribes at full HD.
Reviewed by Cursor Bugbot for commit 972471f. Configure here.


No description provided.