Cleanup codec state reset methods in MediaCodecRenderer

- Remove duplicated null assignments
- Move mediaCryptoRequiresSecureDecoder reset to be with all the
  other mediaCrypto stuff.

PiperOrigin-RevId: 285955134
This commit is contained in:
olly 2019-12-17 12:30:49 +00:00 committed by Oliver Woodman
parent bf6e9c6144
commit fdfbfc0b8e

View file

@ -840,10 +840,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
resetCodecStateForFlush();
availableCodecInfos = null;
codec = null;
codecInfo = null;
codecFormat = null;
codecAdapter = null;
codecOperatingRate = CODEC_OPERATING_RATE_UNSET;
codecAdaptationWorkaroundMode = ADAPTATION_WORKAROUND_MODE_NEVER;
codecNeedsReconfigureWorkaround = false;
@ -856,8 +854,6 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
codecReconfigured = false;
codecReconfigurationState = RECONFIGURATION_STATE_NONE;
resetCodecBuffers();
mediaCrypto = null;
mediaCryptoRequiresSecureDecoder = false;
}