Don't re-init codec if DRM session is unchanged
This condition is trying to detect when it might be necessary to switch from a non-secure to a secure codec. This is not possible if the DRM session is unchanged, unless a different codec is required for some other reason (e.g., H264 -> H265), which is anyway handled by canKeepCodec below. PiperOrigin-RevId: 292909126
This commit is contained in:
parent
b7c5f5cde6
commit
890fd4efb8
@ -1246,7 +1246,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
|
||||
if ((sourceDrmSession == null && codecDrmSession != null)
|
||||
|| (sourceDrmSession != null && codecDrmSession == null)
|
||||
|| (sourceDrmSession != null
|
||||
|| (sourceDrmSession != codecDrmSession
|
||||
&& !codecInfo.secure
|
||||
&& maybeRequiresSecureDecoder(sourceDrmSession, newFormat))
|
||||
|| (Util.SDK_INT < 23 && sourceDrmSession != codecDrmSession)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user