androidx / androidx/media

When tunneling is enabled, seeking to the end causes playback to be stuck, not reaching STATE_ENDED

Open
#1,574 7 comments 0 reactions 1 assignee View on GitHub

@tonihei is already working on this.

Since Jul 31, 2024.

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

Description

We are using ExoPlayer 2.18.7 and Android API level 30.
Our application sometimes requires calling ExoPlayer.seekTo with the positionMs equal to the duration of the content.

When we use non-tunneling mode this works as we expect it to, i.e. player gets into STATE_ENDED and the playback stops.
However, when the same is done in the tunneling mode the playback gets stuck forever.

Analysis of what is causing this shows that under such conditions ExoPlayer starts feeding video decoder samples starting from the the last keyframe, but it does not feed any samples to the audio decoder. So the video decoder accepts several samples and then dequeueInputBuffer starts failing. It is failing because this is tunneling mode ate there are no audio samples to associate the video sample with.

The question is is such seeking to the content duration a valid operation? If "yes" then how should it work with tunneling mode?
Or should ExoPlayer the call to seekTo fail?

A similar question is: let's assume we have a content which does not have any audio for the few last seconds (but does have video) and let's say the app is seeking to such a position with video but without audio. How should such a seek work in the tunneling mode (given that video cannot be synchronized without audio)?

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.