-Fixed MediaSourceManager from inserting already inserted entry.

This commit is contained in:
John Zhen M 2017-10-12 22:29:54 -07:00 committed by John Zhen Mo
parent aed86a7683
commit cf2907d752

View file

@ -273,7 +273,7 @@ public class MediaSourceManager implements DeferredMediaSource.Callback {
* If the play queue index already exists, then the insert is ignored.
* */
private void insert(final int queueIndex, final DeferredMediaSource source) {
if (queueIndex < 0) return;
if (queueIndex < 0 || queueIndex < sources.getSize()) return;
sources.addMediaSource(queueIndex, source);
}