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
d03fb105
authored
May 19, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove readBitsLong, use readBits instead
parent
dd7a7968
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
library/src/main/java/com/google/android/exoplayer/util/ParsableBitArray.java
library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
View file @
d03fb105
...
@@ -532,11 +532,11 @@ public final class TsExtractor implements Extractor, SeekMap {
...
@@ -532,11 +532,11 @@ public final class TsExtractor implements Extractor, SeekMap {
timeUs
=
0
;
timeUs
=
0
;
if
(
ptsFlag
)
{
if
(
ptsFlag
)
{
pesScratch
.
skipBits
(
4
);
// '0010'
pesScratch
.
skipBits
(
4
);
// '0010'
long
pts
=
pesScratch
.
readBitsLong
(
3
)
<<
30
;
long
pts
=
(
long
)
pesScratch
.
readBits
(
3
)
<<
30
;
pesScratch
.
skipBits
(
1
);
// marker_bit
pesScratch
.
skipBits
(
1
);
// marker_bit
pts
|=
pesScratch
.
readBits
Long
(
15
)
<<
15
;
pts
|=
pesScratch
.
readBits
(
15
)
<<
15
;
pesScratch
.
skipBits
(
1
);
// marker_bit
pesScratch
.
skipBits
(
1
);
// marker_bit
pts
|=
pesScratch
.
readBits
Long
(
15
);
pts
|=
pesScratch
.
readBits
(
15
);
pesScratch
.
skipBits
(
1
);
// marker_bit
pesScratch
.
skipBits
(
1
);
// marker_bit
timeUs
=
ptsToTimeUs
(
pts
);
timeUs
=
ptsToTimeUs
(
pts
);
}
}
...
...
library/src/main/java/com/google/android/exoplayer/util/ParsableBitArray.java
View file @
d03fb105
...
@@ -99,21 +99,11 @@ public final class ParsableBitArray {
...
@@ -99,21 +99,11 @@ public final class ParsableBitArray {
* @return An integer whose bottom n bits hold the read data.
* @return An integer whose bottom n bits hold the read data.
*/
*/
public
int
readBits
(
int
n
)
{
public
int
readBits
(
int
n
)
{
return
(
int
)
readBitsLong
(
n
);
}
/**
* Reads up to 64 bits.
*
* @param n The number of bits to read.
* @return A long whose bottom n bits hold the read data.
*/
public
long
readBitsLong
(
int
n
)
{
if
(
n
==
0
)
{
if
(
n
==
0
)
{
return
0
;
return
0
;
}
}
long
retval
=
0
;
int
retval
=
0
;
// While n >= 8, read whole bytes.
// While n >= 8, read whole bytes.
while
(
n
>=
8
)
{
while
(
n
>=
8
)
{
...
...
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