Skip to content

SingleSampleMediaSource Format.Builder bug #10016

Closed

Description

@dejanm

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

Activity

  1. self-assigned this
    on Mar 2, 2022
  2. icbaker commented on Mar 2, 2022

    @icbaker
    Collaborator

    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.

  3. locked and limited conversation to collaborators on May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions