Move FakeRenderer's DrmSession releasing from onReset() to onDisable()

This seems to match DecoderVideoRenderer more closely:
b1e56304a1/library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java (L300)

Although MediaCodecRenderer does it in onReset() and then calls that
from onDisable():
b1e56304a1/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java (L754)

PiperOrigin-RevId: 315859212
This commit is contained in:
ibaker 2020-06-11 10:09:29 +01:00 committed by Oliver Woodman
parent 88b36abce6
commit 032bb0498d

View File

@ -154,7 +154,7 @@ public class FakeRenderer extends BaseRenderer {
} }
@Override @Override
protected void onReset() { protected void onDisabled() {
if (currentDrmSession != null) { if (currentDrmSession != null) {
currentDrmSession.release(/* eventDispatcher= */ null); currentDrmSession.release(/* eventDispatcher= */ null);
currentDrmSession = null; currentDrmSession = null;