Skip to content

Commit

Permalink
Rollback of 1347d57
Browse files Browse the repository at this point in the history
*** Original commit ***

Restore old SampleQueue exoMediaCryptoType behavior

***

PiperOrigin-RevId: 350545215
  • Loading branch information
ojw28 authored and icbaker committed Jan 8, 2021
1 parent b05fa73 commit a7cb6a0
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.google.android.exoplayer2.drm.DrmSession;
import com.google.android.exoplayer2.drm.DrmSessionEventListener;
import com.google.android.exoplayer2.drm.DrmSessionManager;
import com.google.android.exoplayer2.drm.ExoMediaCrypto;
import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.upstream.Allocator;
import com.google.android.exoplayer2.upstream.DataReader;
Expand Down Expand Up @@ -870,11 +869,11 @@ private void onFormatResult(Format newFormat, FormatHolder outputFormatHolder) {
downstreamFormat = newFormat;
@Nullable DrmInitData newDrmInitData = newFormat.drmInitData;

@Nullable
Class<? extends ExoMediaCrypto> exoMediaCryptoType =
(drmSessionManager != null ? drmSessionManager : DrmSessionManager.DUMMY)
.getExoMediaCryptoType(newFormat);
outputFormatHolder.format = newFormat.copyWithExoMediaCryptoType(exoMediaCryptoType);
outputFormatHolder.format =
drmSessionManager != null
? newFormat.copyWithExoMediaCryptoType(
drmSessionManager.getExoMediaCryptoType(newFormat))
: newFormat;
outputFormatHolder.drmSession = currentDrmSession;
if (drmSessionManager == null) {
// This sample queue is not expected to handle DRM. Nothing to do.
Expand Down

0 comments on commit a7cb6a0

Please sign in to comment.