Skip to content

Read the DVB supplementary audio descriptor in TsExtractor - #3575

Open
JooaoGui wants to merge 1 commit into
androidx:mainfrom
JooaoGui:fix/ts-supplementary-audio-descriptor
Open

JooaoGui wants to merge 1 commit into
androidx:mainfrom
JooaoGui:fix/ts-supplementary-audio-descriptor

Conversation

@JooaoGui

Copy link
Copy Markdown

Fixes #3574.

TsExtractor.readEsInfo only took the audio type from the ISO 639 language descriptor. Broadcasters like ORF mark audio description only with the DVB supplementary_audio_descriptor (extension tag 0x06, ETSI EN 300 468), so those tracks had no role flags and could be picked by default.

This reads that descriptor and maps editorial_classification to the audio type (1 and 3 to visual impaired commentary, 2 to hearing impaired), the same way Tvheadend does. When the descriptor has a language code, it is used too. Both win over the ISO 639 descriptor, whatever the order.

Testing

  • Added sample_mpeg_audio_with_supplementary_audio_descriptor.ts, made from sample_mpeg_audio_with_audio_type.ts by rewriting the PMT: the supplementary descriptor (audio description, eng) comes first, then an ISO 639 descriptor with qks and audio type 0. ffprobe shows the track as visual_impaired + descriptions.
  • The new test in TsExtractorTest fails without the fix. All 916 tests in androidx.media3.extractor.ts pass with it.

TsExtractor only took the audio type from the ISO 639 language
descriptor, so audio description tracks that are marked only by a DVB
supplementary_audio_descriptor (extension tag 0x06, ETSI EN 300 468)
had no role flags and could be selected by default.

Map its editorial_classification to the audio type (1 and 3: visual
impaired commentary, 2: hearing impaired) and use its language code
when present. Both take precedence over the ISO 639 descriptor,
whatever the order of the descriptors.

Issue: androidx#3574
@tianyif tianyif assigned tianyif and rohitjoins and unassigned tianyif Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants