mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Remove messages on release of ConcatenatingMediaSource.
That was previously handled by the player. But since we switched to Handler messages instead of player messages, we should do that manually. PiperOrigin-RevId: 229341747
This commit is contained in:
parent
1900e94144
commit
fcda01eb5c
1 changed files with 4 additions and 5 deletions
|
|
@ -473,10 +473,13 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
|||
super.releaseSourceInternal();
|
||||
mediaSourceHolders.clear();
|
||||
mediaSourceByUid.clear();
|
||||
playbackThreadHandler = null;
|
||||
shuffleOrder = shuffleOrder.cloneAndClear();
|
||||
windowCount = 0;
|
||||
periodCount = 0;
|
||||
if (playbackThreadHandler != null) {
|
||||
playbackThreadHandler.removeCallbacksAndMessages(null);
|
||||
playbackThreadHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -603,10 +606,6 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean handleMessage(Message msg) {
|
||||
if (playbackThreadHandler == null) {
|
||||
// Stale event.
|
||||
return false;
|
||||
}
|
||||
switch (msg.what) {
|
||||
case MSG_ADD:
|
||||
MessageData<Collection<MediaSourceHolder>> addMessage =
|
||||
|
|
|
|||
Loading…
Reference in a new issue