mirror of
https://github.com/Xinrea/bili-shadowreplay.git
synced 2025-11-24 20:15:34 +08:00
fix: clip danmu not in range
This commit is contained in:
@@ -876,6 +876,9 @@ impl RecorderManager {
|
||||
// update entry ts to offset and filter danmus in range
|
||||
for d in &mut danmus {
|
||||
d.ts -= stream_start_timestamp_milis + params.local_offset * 1000;
|
||||
if let Some(range) = ¶ms.range {
|
||||
d.ts -= (range.start * 1000.0) as i64;
|
||||
}
|
||||
}
|
||||
if range.duration() > 0.0 {
|
||||
danmus.retain(|x| x.ts >= 0 && x.ts <= (range.duration() * 1000.0).round() as i64);
|
||||
|
||||
Reference in New Issue
Block a user