Commit 7a10f2bf by aquilescanta Committed by Oliver Woodman

Remove pre-renderer-migration workarounds in SampleQueue

They are no longer necessary.

PiperOrigin-RevId: 296193350
parent 47133f46
......@@ -775,13 +775,6 @@ public class SampleQueue implements TrackOutput {
boolean isFirstFormat = downstreamFormat == null;
@Nullable DrmInitData oldDrmInitData = isFirstFormat ? null : downstreamFormat.drmInitData;
downstreamFormat = newFormat;
if (drmSessionManager == DrmSessionManager.DUMMY) {
// Avoid attempting to acquire a session using the dummy DRM session manager. It's likely that
// the media source creation has not yet been migrated and the renderer can acquire the
// session for the read DRM init data.
// TODO: Remove once renderers are migrated [Internal ref: b/122519809].
return;
}
@Nullable DrmInitData newDrmInitData = newFormat.drmInitData;
outputFormatHolder.drmSession = currentDrmSession;
if (!isFirstFormat && Util.areEqual(oldDrmInitData, newDrmInitData)) {
......@@ -811,12 +804,6 @@ public class SampleQueue implements TrackOutput {
* @return Whether it's possible to read the next sample.
*/
private boolean mayReadSample(int relativeReadIndex) {
if (drmSessionManager == DrmSessionManager.DUMMY) {
// TODO: Remove once renderers are migrated [Internal ref: b/122519809].
// For protected content it's likely that the DrmSessionManager is still being injected into
// the renderers. We assume that the renderers will be able to acquire a DrmSession if needed.
return true;
}
return currentDrmSession == null
|| currentDrmSession.getState() == DrmSession.STATE_OPENED_WITH_KEYS
|| ((flags[relativeReadIndex] & C.BUFFER_FLAG_ENCRYPTED) == 0
......
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