Video freeze and segment repeat after starting a short HLS event playlist
@tianyif is already working on this.
Since Jun 12, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Media3 Version
ExoPlayer 2.18.6
Devices that reproduce the issue
Xiaomi MiTV running AndroidTV 9
Emulator running any AndroidTV 8
Emulator running Android 11
Sony Bravia VH21 running AndroidTV 10
Devices that do not reproduce the issue
So far all devices tested reproduce the issue.
Reproducible in the demo app?
Yes
Reproduction steps
- Start playing an HLS event playlist that has not ended yet and is under a minute long
- Play for 30-40 seconds
Expected result
The media plays without any freezes or audio loops.
Actual result
The video freezes, sound loops back to an already played segment. When audio catches up to video, playback normalizes.
The logs show a AudioSink$UnexpectedDiscontinuityException:
Audio sink error
com.google.android.exoplayer2.audio.AudioSink$UnexpectedDiscontinuityException: Unexpected audio track timestamp discontinuity: expected 1000033816011, got 1000025816000
at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:999)
atc om.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:709)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1889)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:782)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
and some frame drops:
droppedFrames [eventTime=34.04, mediaPos=43.76, window=0, period=0, 167]
On Sony Bravia VH21, after the bug audio/video desync appears.
Playing the same URL after a few minutes, when the event stream is longer than a minute does not reproduce this error anymore.
This issue is not new, it has been present since at least r2.15.1 but probably even earlier.
Media
I will provide URL of a stream that this happens on by email, though it doesn't seem to depend on the stream and happens as long as it's an HLS event stream shorter than a minute.
Bug Report
- You will email the zip file produced by
adb bugreportto dev.exoplayer@gmail.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.