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++) {
|
for (int i = 0; i < period.adaptationSets.size(); i++) {
|
||||||
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
||||||
List<Representation> representations = adaptationSet.representations;
|
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
|
// 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()) {
|
|| representations.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1088,9 +1088,9 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||||||
for (int i = 0; i < period.adaptationSets.size(); i++) {
|
for (int i = 0; i < period.adaptationSets.size(); i++) {
|
||||||
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
AdaptationSet adaptationSet = period.adaptationSets.get(i);
|
||||||
List<Representation> representations = adaptationSet.representations;
|
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
|
// 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()) {
|
|| representations.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user