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

Fix exo track id parsing for format change. #4164

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

reacocard
Copy link
Contributor

Without this changing to other audio tracks fails, it just keeps playing the first one in the file. I was tipped off to the source of the problem by lines like this in logcat:

11-04 19:26:01.244 11669 11669 D VideoManager: failed to parse track ID [0:2]

It appears exoplayer changed from a simple number for trackid to two numbers separated by a colon. Haven't had any luck tracking down why, but the latter of the two appears to match the old single number so, just pull that out and use it.

Without this changing to other audio tracks fails, it just keeps playing
the first one in the file. I was tipped off to the source of the problem
by lines like this in logcat:

11-04 19:26:01.244 11669 11669 D VideoManager: failed to parse track ID [0:2]

It appears exoplayer changed from a simple number for trackid to two
numbers separated by a colon. Haven't had any luck tracking down why,
but the latter of the two appears to match the old single number so,
just pull that out and use it.
@reacocard reacocard marked this pull request as ready for review November 5, 2024 05:49
@bin101
Copy link

bin101 commented Nov 5, 2024

Can confirm that this fixes my audio track switching issues.

Copy link
Member

@nielsvanvelzen nielsvanvelzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using external subtitles the media source becomes a MergingMediaSource with the original item as first media source and all subtitle tracks after that. This will change the track ids to be prefixed with their source index (so 1: for the item).

Ideally we should stop parsing the track ids entirely but that might not be possible here.

@nielsvanvelzen nielsvanvelzen added this to the v0.18.0 milestone Nov 5, 2024
@nielsvanvelzen nielsvanvelzen added the bug Something isn't working label Nov 5, 2024
@nielsvanvelzen nielsvanvelzen merged commit 0d00adc into jellyfin:master Nov 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants