diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7c1e42c991..9e02140724 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -59,6 +59,7 @@ * DASH: * Support the `forced-subtitle` track role ([#9727](https://github.com/google/ExoPlayer/issues/9727)). + * Stop interpreting the `main` track role as `C.SELECTION_FLAG_DEFAULT`. * HLS: * Use chunkless preparation by default to improve start up time. If your renditions contain muxed closed-caption tracks that are *not* declared diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java index 4ade8ce361..e0d7e2c43a 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java @@ -1472,8 +1472,6 @@ public class DashManifestParser extends DefaultHandler return 0; } switch (value) { - case "main": - return C.SELECTION_FLAG_DEFAULT; case "forced_subtitle": // Support both hyphen and underscore (https://github.com/google/ExoPlayer/issues/9727). case "forced-subtitle": diff --git a/library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParserTest.java b/library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParserTest.java index cb2d216c32..6516f9d71a 100644 --- a/library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParserTest.java +++ b/library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParserTest.java @@ -243,7 +243,8 @@ public class DashManifestParserTest { assertThat(format.containerMimeType).isEqualTo(MimeTypes.APPLICATION_RAWCC); assertThat(format.sampleMimeType).isEqualTo(MimeTypes.APPLICATION_CEA608); assertThat(format.codecs).isEqualTo("cea608"); - assertThat(format.roleFlags).isEqualTo(C.ROLE_FLAG_SUBTITLE); + assertThat(format.roleFlags).isEqualTo(C.ROLE_FLAG_SUBTITLE | C.ROLE_FLAG_MAIN); + assertThat(format.selectionFlags).isEqualTo(0); assertThat(adaptationSets.get(0).type).isEqualTo(C.TRACK_TYPE_TEXT); format = adaptationSets.get(1).representations.get(0).format; diff --git a/testdata/src/test/assets/media/mpd/sample_mpd_text b/testdata/src/test/assets/media/mpd/sample_mpd_text index 4220f5b2f2..9af9e24915 100644 --- a/testdata/src/test/assets/media/mpd/sample_mpd_text +++ b/testdata/src/test/assets/media/mpd/sample_mpd_text @@ -8,6 +8,7 @@ + https://test.com/0