mirror of
https://github.com/samsonjs/media.git
synced 2026-04-24 14:37:45 +00:00
Don't retry fatal errors in DefaultDrmSession
Issue:#6334 PiperOrigin-RevId: 269553308
This commit is contained in:
parent
b34a10bc1d
commit
5df2f142b4
1 changed files with 5 additions and 3 deletions
|
|
@ -566,8 +566,6 @@ public class DefaultDrmSession<T extends ExoMediaCrypto> implements DrmSession<T
|
||||||
> loadErrorHandlingPolicy.getMinimumLoadableRetryCount(C.DATA_TYPE_DRM)) {
|
> loadErrorHandlingPolicy.getMinimumLoadableRetryCount(C.DATA_TYPE_DRM)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Message retryMsg = Message.obtain(originalMsg);
|
|
||||||
|
|
||||||
IOException ioException =
|
IOException ioException =
|
||||||
e instanceof IOException ? (IOException) e : new UnexpectedDrmSessionException(e);
|
e instanceof IOException ? (IOException) e : new UnexpectedDrmSessionException(e);
|
||||||
long retryDelayMs =
|
long retryDelayMs =
|
||||||
|
|
@ -576,7 +574,11 @@ public class DefaultDrmSession<T extends ExoMediaCrypto> implements DrmSession<T
|
||||||
/* loadDurationMs= */ SystemClock.elapsedRealtime() - requestTask.startTimeMs,
|
/* loadDurationMs= */ SystemClock.elapsedRealtime() - requestTask.startTimeMs,
|
||||||
ioException,
|
ioException,
|
||||||
requestTask.errorCount);
|
requestTask.errorCount);
|
||||||
sendMessageDelayed(retryMsg, retryDelayMs);
|
if (retryDelayMs == C.TIME_UNSET) {
|
||||||
|
// The error is fatal.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
sendMessageDelayed(Message.obtain(originalMsg), retryDelayMs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue