androidx / androidx/media

UnexpectedDiscontinuityException when playing a stream

Open
#2,213 5 comments 2 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 1.5.0

More version details

No response

Devices that reproduce the issue

Any android device

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps
  1. Pull the following fork & run the demo app (main): https://github.com/pmendozav/media/tree/aljazeera-test
  2. Let the stream play for a couple of minutes
Expected result

The media should play without any interruptions.

Actual result

Video stops while audio keeps playing in the background for a couple of seconds, throwing the following stack trace:

Audio sink error
androidx.media3.exoplayer.audio.AudioSink$UnexpectedDiscontinuityException: Unexpected audio track timestamp discontinuity: expected 1000080090388, got 1000090095722
                                                                                                          at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:1003)
                                                                                                          at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:813)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:2067)
                                                                                                          at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:875)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1138)
                                                                                                          at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:562)
                                                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                          at android.os.Looper.loop(Looper.java:223)
                                                                                                          at android.os.HandlerThread.run(HandlerThread.java:67)
Media

Included on this fork: https://github.com/pmendozav/media/commit/30a965762178bae168f3bb3c8bf80d4285525cbe

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.