Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to cap very large position values #1206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RtypeStudios
Copy link

We have seen in some situations when using nimble media server. The position values can come though as what looks like close to max int64 values such as 9223372036850115913

Which causes the following error when flutter tries to convert the value to a using DateTime.fromMillisecondsSinceEpoch().

RangeError (millisecondsSinceEpoch): Invalid value: Not in inclusive range -8640000000000000..8640000000000000: 9223372036850115913

Our guess is this only happens with streams that don't have an end (such as tv).

The below patch checks the value and accordingly returns null if the value for position exceeded what the datetime can handle.

This issue has been raised in the following two reports:

#1068
#884

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