Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.21 #26

Merged
merged 15 commits into from
Feb 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hls-to-udp: Fix overflow on arm
  • Loading branch information
Chris Kennedy committed Feb 18, 2025
commit beb2565b87fff80f036f8b2e277202d6c6ddf38e
8 changes: 5 additions & 3 deletions hls-to-udp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,16 +668,18 @@ fn sender_thread(
let elapsed_micros = elapsed.as_micros();
if elapsed_micros > 0 {
let sent_bps =
(chunk.len() as u32 * 8 * 1000000) / elapsed_micros as u32;
(chunk.len() as u64 * 8 * 1000000) / elapsed_micros as u64;
log::debug!(
"HLStoUDP: UDPThread Sent {} bytes in {} micros, rate {} bps.",
chunk.len(),
elapsed_micros,
sent_bps
);
// Adjust frame_time_micros to keep bitrate from bursting
frame_time_micros =
(chunk.len() as u32 * 8 * 1000000) / sent_bps;
if sent_bps > 0 {
frame_time_micros =
(chunk.len() as u64 * 8 * 1000000) / sent_bps;
}
}

// calculate how long we should sleep to maintain a constant rate
Expand Down