fix: record mode decode-per-packet (same fix as live mode)
The --record recv loop was using while-drain which exhausted the jitter buffer and stopped decoding after the first burst. Now decodes once per source packet, matching the live mode fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -325,8 +325,10 @@ async fn run_file_mode(
|
||||
result = recv_transport.recv_media() => {
|
||||
match result {
|
||||
Ok(Some(pkt)) => {
|
||||
let is_repair = pkt.header.is_repair;
|
||||
decoder.ingest(pkt);
|
||||
while let Some(n) = decoder.decode_next(&mut pcm_buf) {
|
||||
if !is_repair {
|
||||
if let Some(n) = decoder.decode_next(&mut pcm_buf) {
|
||||
all_pcm.extend_from_slice(&pcm_buf[..n]);
|
||||
frames_received += 1;
|
||||
if frames_received % 250 == 0 {
|
||||
@@ -338,6 +340,7 @@ async fn run_file_mode(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(None) => {
|
||||
info!("connection closed by remote");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user