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:
Görkem Güclü 2022-12-09 15:29:23 +01:00
parent 2f8fd87fa2
commit dad74276ef

View File

@ -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;
}