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: prevent infinite loop causing stream freeze in DASH multi-period streams #1947

Merged

Conversation

totallyunknown
Copy link

  • Added a condition to ensure requiredIntervalUs > 0 in DashMediaSource.
  • Resolves an issue where negative requiredIntervalUs triggered an infinite loop in onPlaylistUpdateRequested(), leading to application/stream freezes.

This fix restores smooth playback for multi-period DASH streams.

This fixes #1698.

@rohitjoins rohitjoins self-assigned this Dec 3, 2024
@rohitjoins
Copy link
Contributor

Playback freeze persists even after applying this fix. It's unclear if this is directly related to issue #1698.

Assigning it to Toni for a deeper investigation.

@rohitjoins rohitjoins requested a review from tonihei December 11, 2024 17:42
@rohitjoins rohitjoins assigned tonihei and unassigned rohitjoins Dec 11, 2024
@totallyunknown
Copy link
Author

totallyunknown commented Dec 11, 2024

@rohitjoins Which stream did you test? I made originally the bisect and my colleague @mikef-dk reported the issue #1698. The test stream we've sent via email didn't freeze anymore. If you have tested with that particular streams it's possible that you've hit an experimental stitchter version on our side.

@rohitjoins
Copy link
Contributor

I tested it with the same stream that was sent via email on a pixel 4A.

@totallyunknown
Copy link
Author

I am sorry. I've reverted the version of our service to an older version now. Can you please test again? This stream should not hang with that fix.

@tonihei
Copy link
Collaborator

tonihei commented Dec 18, 2024

Thanks for the fix proposal, I was able to reproduce the issue and also verify that the fix works. I'll start the merge process and may see further updates (e.g. formatting) appear here.

@tonihei tonihei force-pushed the fix/dash-playlist-infinite-loop branch 3 times, most recently from 1f9b78f to 1383f6b Compare December 18, 2024 17:55
totallyunknown and others added 2 commits December 19, 2024 16:18
… streams

- Added a condition to ensure `requiredIntervalUs > 0` in `DashMediaSource`.
- Resolves an issue where negative `requiredIntervalUs` triggered an infinite loop in `onPlaylistUpdateRequested()`, leading to application/stream freezes.

This fix restores smooth playback for multi-period DASH streams.
@tonihei tonihei force-pushed the fix/dash-playlist-infinite-loop branch from 1383f6b to cb578c0 Compare December 19, 2024 16:21
@copybara-service copybara-service bot merged commit 871c159 into androidx:main Jan 6, 2025
1 check passed
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.

3 participants