Skip to content

If you pause after 8 seconds before the end of the video, only the audio will continue to play. #10844

Open

Description

As the title suggests, I am puzzled by the phenomenon that when the video is paused in the last 8 seconds of the video, the video stops, but the audio continues to play.

This is caused by using the following function and setting the parameter to True

DefaultRenderersFactory(context).setEnableAudioTrackPlaybackParams(true)

Will not occur if setEnableAudioTrackPlaybackParams is given false

I want to avoid settingEnableAudioTrackPlaybackParams to false because it slows down the playback speed switching.

Is there any way to keep setEnableAudioTrackPlaybackParams true and still have the audio stop playing correctly?

I have followed the behavior and I think the problem is that audioTrack.pause() is not called in the following implementation
file:DefaultAudioSink.java

 @Override
 public void pause() {
    playing = false;
    if (isAudioTrackInitialized() && audioTrackPositionTracker.pause()) {
      audioTrack.pause();
    }
 }

audioTrackPositionTracker.pause returns false

I apologize if I offended you because I use a translation website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions