mirror of
https://github.com/samsonjs/media.git
synced 2026-04-26 14:57:47 +00: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
1 changed files with 4 additions and 4 deletions
|
|
@ -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…
Reference in a new issue