Skip to content

Commit

Permalink
Remove FormatHolder.includesDrmSession
Browse files Browse the repository at this point in the history
With the Renderer migration, this is officially unnecessary, and
should always be true for supported encrypted content.

PiperOrigin-RevId: 295584542
  • Loading branch information
AquilesCanta authored and icbaker committed Feb 17, 2020
1 parent bd02812 commit 3591562
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
*/
public final class FormatHolder {

/** Whether the {@link #format} setter also sets the {@link #drmSession} field. */
// TODO: Remove once all Renderers and MediaSources have migrated to the new DRM model [Internal
// ref: b/129764794].
public boolean includesDrmSession;

/** An accompanying context for decrypting samples in the format. */
@Nullable public DrmSession<?> drmSession;

Expand All @@ -36,7 +31,6 @@ public final class FormatHolder {

/** Clears the holder. */
public void clear() {
includesDrmSession = false;
drmSession = null;
format = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,6 @@ private void onFormatResult(Format newFormat, FormatHolder outputFormatHolder) {
return;
}
@Nullable DrmInitData newDrmInitData = newFormat.drmInitData;
outputFormatHolder.includesDrmSession = true;
outputFormatHolder.drmSession = currentDrmSession;
if (!isFirstFormat && Util.areEqual(oldDrmInitData, newDrmInitData)) {
// Nothing to do.
Expand Down

0 comments on commit 3591562

Please sign in to comment.