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
21dd59ba
authored
Dec 03, 2019
by
andrewlewis
Committed by
bachinger
Dec 04, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Don't try to track buffersInCodec with tunneling
PiperOrigin-RevId: 283551324
parent
6c10c94f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
21dd59ba
...
@@ -763,7 +763,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -763,7 +763,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
@CallSuper
@CallSuper
@Override
@Override
protected
void
onQueueInputBuffer
(
DecoderInputBuffer
buffer
)
{
protected
void
onQueueInputBuffer
(
DecoderInputBuffer
buffer
)
{
buffersInCodecCount
++;
// In tunneling mode the device may do frame rate conversion, so in general we can't keep track
// of the number of buffers in the codec.
if
(!
tunneling
)
{
buffersInCodecCount
++;
}
lastInputTimeUs
=
Math
.
max
(
buffer
.
timeUs
,
lastInputTimeUs
);
lastInputTimeUs
=
Math
.
max
(
buffer
.
timeUs
,
lastInputTimeUs
);
if
(
Util
.
SDK_INT
<
23
&&
tunneling
)
{
if
(
Util
.
SDK_INT
<
23
&&
tunneling
)
{
// In tunneled mode before API 23 we don't have a way to know when the buffer is output, so
// In tunneled mode before API 23 we don't have a way to know when the buffer is output, so
...
@@ -1008,7 +1012,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -1008,7 +1012,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
@CallSuper
@CallSuper
@Override
@Override
protected
void
onProcessedOutputBuffer
(
long
presentationTimeUs
)
{
protected
void
onProcessedOutputBuffer
(
long
presentationTimeUs
)
{
buffersInCodecCount
--;
if
(!
tunneling
)
{
buffersInCodecCount
--;
}
while
(
pendingOutputStreamOffsetCount
!=
0
while
(
pendingOutputStreamOffsetCount
!=
0
&&
presentationTimeUs
>=
pendingOutputStreamSwitchTimesUs
[
0
])
{
&&
presentationTimeUs
>=
pendingOutputStreamSwitchTimesUs
[
0
])
{
outputStreamOffsetUs
=
pendingOutputStreamOffsetsUs
[
0
];
outputStreamOffsetUs
=
pendingOutputStreamOffsetsUs
[
0
];
...
...
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