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
fbb47156
authored
Oct 03, 2019
by
olly
Committed by
Oliver Woodman
Oct 04, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Minor upstream cleanup
PiperOrigin-RevId: 272614610
parent
4f640bc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java
View file @
fbb47156
...
@@ -53,7 +53,6 @@ public final class CacheDataSink implements DataSink {
...
@@ -53,7 +53,6 @@ public final class CacheDataSink implements DataSink {
private
long
dataSpecFragmentSize
;
private
long
dataSpecFragmentSize
;
private
File
file
;
private
File
file
;
private
OutputStream
outputStream
;
private
OutputStream
outputStream
;
private
FileOutputStream
underlyingFileOutputStream
;
private
long
outputStreamBytesWritten
;
private
long
outputStreamBytesWritten
;
private
long
dataSpecBytesWritten
;
private
long
dataSpecBytesWritten
;
private
ReusableBufferedOutputStream
bufferedOutputStream
;
private
ReusableBufferedOutputStream
bufferedOutputStream
;
...
@@ -171,7 +170,7 @@ public final class CacheDataSink implements DataSink {
...
@@ -171,7 +170,7 @@ public final class CacheDataSink implements DataSink {
file
=
file
=
cache
.
startFile
(
cache
.
startFile
(
dataSpec
.
key
,
dataSpec
.
absoluteStreamPosition
+
dataSpecBytesWritten
,
length
);
dataSpec
.
key
,
dataSpec
.
absoluteStreamPosition
+
dataSpecBytesWritten
,
length
);
underlyingFileOutputStream
=
new
FileOutputStream
(
file
);
FileOutputStream
underlyingFileOutputStream
=
new
FileOutputStream
(
file
);
if
(
bufferSize
>
0
)
{
if
(
bufferSize
>
0
)
{
if
(
bufferedOutputStream
==
null
)
{
if
(
bufferedOutputStream
==
null
)
{
bufferedOutputStream
=
new
ReusableBufferedOutputStream
(
underlyingFileOutputStream
,
bufferedOutputStream
=
new
ReusableBufferedOutputStream
(
underlyingFileOutputStream
,
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java
View file @
fbb47156
...
@@ -52,10 +52,10 @@ public final class AesCipherDataSink implements DataSink {
...
@@ -52,10 +52,10 @@ public final class AesCipherDataSink implements DataSink {
*
*
* @param secretKey The key data.
* @param secretKey The key data.
* @param wrappedDataSink The wrapped {@link DataSink}.
* @param wrappedDataSink The wrapped {@link DataSink}.
* @param scratch Scratch space. Data is
de
crypted into this array before being written to the
* @param scratch Scratch space. Data is
en
crypted into this array before being written to the
* wrapped {@link DataSink}. It should be of appropriate size for the expected writes. If a
* wrapped {@link DataSink}. It should be of appropriate size for the expected writes. If a
* write is larger than the size of this array the write will still succeed, but multiple
* write is larger than the size of this array the write will still succeed, but multiple
* cipher calls will be required to complete the operation. If {@code null} then
de
cryption
* cipher calls will be required to complete the operation. If {@code null} then
en
cryption
* will overwrite the input {@code data}.
* will overwrite the input {@code data}.
*/
*/
public
AesCipherDataSink
(
byte
[]
secretKey
,
DataSink
wrappedDataSink
,
@Nullable
byte
[]
scratch
)
{
public
AesCipherDataSink
(
byte
[]
secretKey
,
DataSink
wrappedDataSink
,
@Nullable
byte
[]
scratch
)
{
...
@@ -96,5 +96,4 @@ public final class AesCipherDataSink implements DataSink {
...
@@ -96,5 +96,4 @@ public final class AesCipherDataSink implements DataSink {
cipher
=
null
;
cipher
=
null
;
wrappedDataSink
.
close
();
wrappedDataSink
.
close
();
}
}
}
}
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