Commit 58280f97 by andrewlewis Committed by Oliver Woodman

Fix continueLoading in IMA deferred periods

continueLoading may be called during preparation, but this is not
handled correctly in the case where a deferred period doesn't
have a source yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158696539
parent c980eae9
......@@ -506,7 +506,7 @@ public final class ImaAdsMediaSource implements MediaSource {
@Override
public boolean continueLoading(long positionUs) {
return mediaPeriod.continueLoading(positionUs);
return mediaPeriod != null && mediaPeriod.continueLoading(positionUs);
}
// MediaPeriod.Callback implementation.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment