Skip to content

Commit

Permalink
Fix FormatInitializationMetadata duration fields
Browse files Browse the repository at this point in the history
  • Loading branch information
coletdjnz committed Nov 6, 2024
1 parent 40a3ef5 commit 6aab1b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion yt_dlp_plugins/extractor/_ytse/downloader/sabr.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def process_format_initialization_metadata(self, part: UMPPart):

initialized_format = InitializedFormat(
format_id=fmt_init_metadata.format_id,
total_duration_ms=fmt_init_metadata.duration_ms,
total_duration_ms=int((fmt_init_metadata.duration / fmt_init_metadata.duration_timescale) * 1000),
end_time_ms=fmt_init_metadata.end_time_ms,
mime_type=fmt_init_metadata.mime_type,
buffered_range=BufferedRange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ class FormatInitializationMetadata:
init_range: typing.Optional[InitRange] = protobug.field(6, default=None)
index_range: typing.Optional[IndexRange] = protobug.field(7, default=None)
format: typing.Optional[Format] = protobug.field(8, default=None)
duration_ms: typing.Optional[protobug.Int32] = protobug.field(9, default=None)
field10: typing.Optional[protobug.Int32] = protobug.field(10, default=None)
duration: typing.Optional[protobug.Int32] = protobug.field(9, default=None)
duration_timescale: typing.Optional[protobug.Int32] = protobug.field(10, default=None)

0 comments on commit 6aab1b4

Please sign in to comment.