mirror of
https://github.com/androidx/media.git
synced 2025-05-04 14:10:40 +08:00
Image AdaptationSets have to be excluded from duration calculation, similar to Text AdaptationSets, see issue 4029 (https://github.com/google/ExoPlayer/issues/4029).
This commit is contained in:
parent
2f8fd87fa2
commit
dad74276ef
@ -1056,9 +1056,9 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
for (int i = 0; i < period.adaptationSets.size(); i++) {
|
||||
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
||||
List<Representation> representations = adaptationSet.representations;
|
||||
// Exclude text adaptation sets from duration calculations, if we have at least one audio
|
||||
// Exclude text and image adaptation sets from duration calculations, if we have at least one audio
|
||||
// or video adaptation set. See: https://github.com/google/ExoPlayer/issues/4029
|
||||
if ((haveAudioVideoAdaptationSets && adaptationSet.type == C.TRACK_TYPE_TEXT)
|
||||
if ((haveAudioVideoAdaptationSets && (adaptationSet.type == C.TRACK_TYPE_TEXT || adaptationSet.type == C.TRACK_TYPE_IMAGE))
|
||||
|| representations.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
@ -1088,9 +1088,9 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
for (int i = 0; i < period.adaptationSets.size(); i++) {
|
||||
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
||||
List<Representation> representations = adaptationSet.representations;
|
||||
// Exclude text adaptation sets from duration calculations, if we have at least one audio
|
||||
// Exclude text and image adaptation sets from duration calculations, if we have at least one audio
|
||||
// or video adaptation set. See: https://github.com/google/ExoPlayer/issues/4029
|
||||
if ((haveAudioVideoAdaptationSets && adaptationSet.type == C.TRACK_TYPE_TEXT)
|
||||
if ((haveAudioVideoAdaptationSets && (adaptationSet.type == C.TRACK_TYPE_TEXT || adaptationSet.type == C.TRACK_TYPE_IMAGE))
|
||||
|| representations.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user