mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Send empty timeline for empty DynamicConcatenatingMediaSource immediately.
Without child sources, the timeline can't possibly updated again within the current looper message. Thus, we can send the empty timeline immediately. This fixes a recently introduced flakiness in the test. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187295700
This commit is contained in:
parent
38914f0ba5
commit
32b4db361f
@ -322,10 +322,14 @@ public final class DynamicConcatenatingMediaSource extends CompositeMediaSource<
|
||||
public synchronized void prepareSourceInternal(ExoPlayer player, boolean isTopLevelSource) {
|
||||
super.prepareSourceInternal(player, isTopLevelSource);
|
||||
this.player = player;
|
||||
if (mediaSourcesPublic.isEmpty()) {
|
||||
notifyListener();
|
||||
} else {
|
||||
shuffleOrder = shuffleOrder.cloneAndInsert(0, mediaSourcesPublic.size());
|
||||
addMediaSourcesInternal(0, mediaSourcesPublic);
|
||||
scheduleListenerNotification(/* actionOnCompletion= */ null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user