1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

LibVideo: Give Matroska duration an absolute value getter

Previously, the duration had to be multiplied by timestamp_scale and
converted to a Time object, now SegmentInformation::duration() does it
itself.
This commit is contained in:
Zaggy1024 2022-11-13 19:13:50 -06:00 committed by Andreas Kling
parent a58bf7c3d1
commit 2a9fb8b439
3 changed files with 13 additions and 9 deletions

View file

@ -270,8 +270,8 @@ static DecoderErrorOr<SegmentInformation> parse_information(Streamer& streamer)
dbgln_if(MATROSKA_DEBUG, "Read WritingApp attribute: {}", segment_information.writing_app().as_string());
break;
case DURATION_ID:
segment_information.set_duration(TRY_READ(streamer.read_float()));
dbgln_if(MATROSKA_DEBUG, "Read Duration attribute: {}", segment_information.duration().value());
segment_information.set_duration_unscaled(TRY_READ(streamer.read_float()));
dbgln_if(MATROSKA_DEBUG, "Read Duration attribute: {}", segment_information.duration_unscaled().value());
break;
default:
TRY_READ(streamer.read_unknown_element());