mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibMedia: Clamp Matroska cluster timestamps when casting them
This commit is contained in:
parent
f899d49e18
commit
dcc2359eac
Notes:
github-actions[bot]
2025-11-21 10:04:09 +00:00
Author: https://github.com/Zaggy1024
Commit: dcc2359eac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6685
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
|
@ -616,7 +616,7 @@ static DecoderErrorOr<Cluster> parse_cluster(Streamer& streamer, u64 timestamp_s
|
|||
TRY_READ(streamer.seek_to_position(first_element_position));
|
||||
|
||||
Cluster cluster;
|
||||
cluster.set_timestamp(AK::Duration::from_nanoseconds(timestamp.release_value() * timestamp_scale));
|
||||
cluster.set_timestamp(AK::Duration::from_nanoseconds(AK::clamp_to<i64>(timestamp.release_value() * timestamp_scale)));
|
||||
return cluster;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue