Skip to content

VOD → LL-HLS playlist transition can get stuck in repeated buffering with rapid SOURCE_UPDATE and decoder churn #3052

@strangesource

Description

@strangesource

Version

Media3 1.8.0
Media3 1.9.1

More version details

No response

Devices that reproduce the issue

Google Pixel 6 Pro (Android 13)
Android emulators (multiple configurations)

Devices that do not reproduce the issue

unknown

Reproducible in the demo app?

Yes

Reproduction steps

Apply the provided patch (adds playlist entry to the demo media.exolist.json)

  1. Add playlist with VoD,VoD,VoD,VoD,HLS-ll
  2. Start the Main Demo app
  3. Start the new playlist sample
  4. Switch through the VOD items by clicking the Next item arrow
  5. Let the last VOD item play until the end
  6. Observe the transition from VOD → LL-HLS live getting stuck (~10% reproduction rate)

Expected result

The player transitions smoothly from the last VOD item to the LL-HLS live item:

  • playback continues without interruption
  • no prolonged buffering loop
  • playlist transition is correctly signaled

Actual result

During the transition from VOD → LL-HLS live, playback can become unstable and appear stuck:

  • player repeatedly enters BUFFERING
  • playback/transition appears “stuck” near the end of the VOD item
  • often recovers eventually, but not reliably
  • logs show frequent SOURCE_UPDATE events and repeated decoder release/recreation during the transition

Additional context / suspected cause

This only happens when transitioning from a VOD item into a low-latency live item (source provided via e-mail).
Our suspicion is that the frequent manifest refreshes / fast timeline updates for LL-HLS cause the player to repeatedly invalidate/discard the currently playing or upcoming MediaPeriod during the playlist boundary. This appears to trigger repeated renderer/decoder teardown and recreation (audio/video), which results in repeated buffering loops and the transition getting “stuck”.

Log excerpts show repeated:

  • timeline ... reason=SOURCE_UPDATE
  • audioDecoderInitialized followed shortly by audioDecoderReleased
  • renderer enable/disable cycles around the buffering state

We also tried mitigating this by adjusting MediaPeriodQueue.canKeepMediaPeriodHolder to keep the holder when start position diverges by ≤2s, which reduced churn but introduced side effects (playlist transition signaling became unreliable), so this is not a viable solution.

Media

Will be shared via e-mail

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions