Skip to content

Commit

Permalink
Ensure progress reporting is called even with small segment sizes and…
Browse files Browse the repository at this point in the history
… high network speeds
  • Loading branch information
emarsden committed Jul 9, 2024
1 parent 4ba2d36 commit 53c0625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,7 @@ async fn fetch_fragment(
.map_err(|e| DashMpdError::Io(e, format!("writing {fragment_type} fragment")))?;
}
let elapsed = bw_estimator_started.elapsed().as_secs_f64();
if elapsed > 0.5 || bw_estimator_bytes > 1000 {
if (elapsed > 1.5) || (bw_estimator_bytes > 100_000) {
let bw = bw_estimator_bytes as f64 / (1e6 * elapsed);
let msg = if bw > 0.5 {
format!("Fetching {fragment_type} segments ({bw:.1} MB/s)")
Expand Down

0 comments on commit 53c0625

Please sign in to comment.