Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
62eb8457
authored
Sep 11, 2019
by
aquilescanta
Committed by
Oliver Woodman
Sep 13, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Attempt acquisition of a placeholder session if format.drmInitData is null
Issue:#4867 PiperOrigin-RevId: 268505056
parent
143d7d6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/DecryptableSampleQueueReader.java
library/core/src/main/java/com/google/android/exoplayer2/source/DecryptableSampleQueueReader.java
View file @
62eb8457
...
@@ -156,6 +156,7 @@ public final class DecryptableSampleQueueReader {
...
@@ -156,6 +156,7 @@ public final class DecryptableSampleQueueReader {
*/
*/
private
void
onFormat
(
Format
format
,
FormatHolder
outputFormatHolder
)
{
private
void
onFormat
(
Format
format
,
FormatHolder
outputFormatHolder
)
{
outputFormatHolder
.
format
=
format
;
outputFormatHolder
.
format
=
format
;
boolean
isFirstFormat
=
currentFormat
==
null
;
DrmInitData
oldDrmInitData
=
currentFormat
!=
null
?
currentFormat
.
drmInitData
:
null
;
DrmInitData
oldDrmInitData
=
currentFormat
!=
null
?
currentFormat
.
drmInitData
:
null
;
currentFormat
=
format
;
currentFormat
=
format
;
if
(
sessionManager
==
DrmSessionManager
.
DUMMY
)
{
if
(
sessionManager
==
DrmSessionManager
.
DUMMY
)
{
...
@@ -167,7 +168,7 @@ public final class DecryptableSampleQueueReader {
...
@@ -167,7 +168,7 @@ public final class DecryptableSampleQueueReader {
}
}
outputFormatHolder
.
includesDrmSession
=
true
;
outputFormatHolder
.
includesDrmSession
=
true
;
outputFormatHolder
.
drmSession
=
currentSession
;
outputFormatHolder
.
drmSession
=
currentSession
;
if
(
Util
.
areEqual
(
oldDrmInitData
,
format
.
drmInitData
))
{
if
(
!
isFirstFormat
&&
Util
.
areEqual
(
oldDrmInitData
,
format
.
drmInitData
))
{
// Nothing to do.
// Nothing to do.
return
;
return
;
}
}
...
@@ -175,12 +176,11 @@ public final class DecryptableSampleQueueReader {
...
@@ -175,12 +176,11 @@ public final class DecryptableSampleQueueReader {
// can be used for both DrmInitData.
// can be used for both DrmInitData.
DrmSession
<?>
previousSession
=
currentSession
;
DrmSession
<?>
previousSession
=
currentSession
;
DrmInitData
drmInitData
=
currentFormat
.
drmInitData
;
DrmInitData
drmInitData
=
currentFormat
.
drmInitData
;
if
(
drmInitData
!=
null
)
{
Looper
playbackLooper
=
Assertions
.
checkNotNull
(
Looper
.
myLooper
());
currentSession
=
currentSession
=
sessionManager
.
acquireSession
(
Assertions
.
checkNotNull
(
Looper
.
myLooper
()),
drmInitData
);
drmInitData
!=
null
}
else
{
?
sessionManager
.
acquireSession
(
playbackLooper
,
drmInitData
)
currentSession
=
null
;
:
sessionManager
.
acquirePlaceholderSession
(
playbackLooper
);
}
outputFormatHolder
.
drmSession
=
currentSession
;
outputFormatHolder
.
drmSession
=
currentSession
;
if
(
previousSession
!=
null
)
{
if
(
previousSession
!=
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment