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

SingleSampleMediaSource Format.Builder bug #10016

Closed
dejanm opened this issue Mar 2, 2022 · 1 comment
Closed

SingleSampleMediaSource Format.Builder bug #10016

dejanm opened this issue Mar 2, 2022 · 1 comment
Assignees
Labels

Comments

@dejanm
Copy link

dejanm commented Mar 2, 2022

SetId for Format Builder is used twice, meaning subtitleConfiguration.id is the only valid id that will be used.
Please resolve the problem in the following code:

format =
new Format.Builder()
.setId(trackId)
.setSampleMimeType(firstNonNull(subtitleConfiguration.mimeType, MimeTypes.TEXT_UNKNOWN))
.setLanguage(subtitleConfiguration.language)
.setSelectionFlags(subtitleConfiguration.selectionFlags)
.setRoleFlags(subtitleConfiguration.roleFlags)
.setLabel(subtitleConfiguration.label)
.setId(subtitleConfiguration.id)
.build();

I believe that trackId is not needed anymore.

  • ExoPlayer version number 2.17.0
  • Android version 12
  • Android device Samsung s21
@icbaker
Copy link
Collaborator

icbaker commented Mar 2, 2022

Thanks for flagging this - I'll deprecate SingleSampleMediaSource.Factory#setTrackId but change the logic in the constructor to still use its value if SubtitleConfiguration#id is null.

icbaker added a commit to androidx/media that referenced this issue Mar 7, 2022
This method is no longer needed since we added SubtitleConfiguration#id
in 59d98b9.

Issue: google/ExoPlayer#10016

#minor-release

PiperOrigin-RevId: 432169262
icbaker added a commit that referenced this issue Mar 7, 2022
This method is no longer needed since we added SubtitleConfiguration#id
in 59d98b9.

Issue: #10016

#minor-release

PiperOrigin-RevId: 432169262
@icbaker icbaker closed this as completed Mar 7, 2022
icbaker added a commit that referenced this issue Mar 9, 2022
This method is no longer needed since we added SubtitleConfiguration#id
in 59d98b9.

Issue: #10016

PiperOrigin-RevId: 432169262
(cherry picked from commit 540f206)
icbaker added a commit to androidx/media that referenced this issue Mar 9, 2022
This method is no longer needed since we added SubtitleConfiguration#id
in 59d98b9.

Issue: google/ExoPlayer#10016

#minor-release

PiperOrigin-RevId: 432169262
(cherry picked from commit 232f2d8)
@google google locked and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants