Skip to content

fix: prevent infinite loop causing stream freeze in DASH multi-period streams - #1947

Merged
copybara-service[bot] merged 2 commits into
androidx:mainfrom
totallyunknown:fix/dash-playlist-infinite-loop
Jan 6, 2025
Merged

copybara-service[bot] merged 2 commits into
androidx:mainfrom
totallyunknown:fix/dash-playlist-infinite-loop

Conversation

@totallyunknown

Copy link
Copy Markdown
Contributor
  • 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
Copy Markdown
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

totallyunknown commented Dec 11, 2024 •

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

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

@totallyunknown

Copy link
Copy Markdown
Contributor 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

tonihei commented Dec 18, 2024

Copy link
Copy Markdown
Collaborator

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
@androidx androidx locked and limited conversation to collaborators Mar 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants