Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Momentary AV freeze when audio track changed on onSelectTrack #1765

Open
1 task done
sealarindam2001 opened this issue Sep 27, 2024 · 0 comments
Open
1 task done

Momentary AV freeze when audio track changed on onSelectTrack #1765

sealarindam2001 opened this issue Sep 27, 2024 · 0 comments
Assignees

Comments

@sealarindam2001
Copy link

sealarindam2001 commented Sep 27, 2024

Version

Media3 1.3.0

More version details

I am using this below code :
@OverRide
public boolean onSelectTrack(int type, String trackId) {
final Tracks tracks = player.getCurrentTracks();
Tracks.Group audioTrackGroup = null;
for (Tracks.Group trackGroup : tracks.getGroups()) {
if(trackGroup.getMediaTrackGroup().id.equals(trackId)){
Log.i(TAG, "onSelectTrack audioTrackGroup " + audioTrackGroup);
audioTrackGroup = trackGroup;
break;
}
}
if(audioTrackGroup!=null){
Log.i(TAG, "onSelectTrack audioTrackGroup " + audioTrackGroup);
defaultTrackSelector.setParameters(
defaultTrackSelector.getParameters()
.buildUpon()
.setOverrideForType(
new TrackSelectionOverride(
audioTrackGroup.getMediaTrackGroup(),0))
.build()
);
}
return true;
}

After switching tracks, may be there will be a gap. It is suspected that there is
a certain amount of diff between the new audio and the current video after switching, and the gap is caused by synchronisation.

Log attached.
Archive.zip

video link:
https://www.jiocloud.com/l/?u=f4b4d8nDFDk-djiFIsXmZbtTJ2phUx9nUNkPJUJ583g=Oe5

CCodecBuffers class taking some time I can see in log.

Devices that reproduce the issue

We are using STB Android 11 , SDK version 30

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Launch LiveTV
  2. tune to muti audio service
  3. change track using remote blue key
  4. Momentary AV freeze foe some mili seconds

Expected result

When track changed AV should be smooth

Actual result

Momentary AV freeze for some mili seconds

Media

Its FTA

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants