Skip to content

Fix Default implementation for TimeBase#364

Merged
pdeljanov merged 1 commit intopdeljanov:rel-0.5from
1c3t3a:time-fixes
Apr 1, 2026
Merged

Fix Default implementation for TimeBase#364
pdeljanov merged 1 commit intopdeljanov:rel-0.5from
1c3t3a:time-fixes

Conversation

@1c3t3a
Copy link
Copy Markdown

@1c3t3a 1c3t3a commented Mar 19, 2025

A TimeBase represents symphonia's conversion factor between time. It does not make sense for it to have a factor of 0, which is also checked by its constructor TimeBase::new. Unfortunately the Default implementation for TimeBase is derived, yielding a value of 0 for both u32 members (numerator and denominator), which is probably not what we want. This change switches the default to be 1.

Also fixes a typo in the doc comment for TimeStamp.

A TimeBase represents symphonia's conversion factor between time.
It does not make sense for it to have a factor of 0, which is also
checked by its constructor TimeBase::new. Unfortunately the Default
implementation for TimeBase is derived, yielding a value of 0 for both
u32 members (numerator and denominator), which is probably not what we
want. This change switches the default to be 1.

Also fixes a typo in the doc comment for TimeStamp.
@pdeljanov pdeljanov merged commit 36a9b58 into pdeljanov:rel-0.5 Apr 1, 2026
@pdeljanov
Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants