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
be721943
authored
Oct 02, 2014
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix incorrect condition.
parent
1c92b28b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
library/src/main/java/com/google/android/exoplayer/MediaCodecVideoTrackRenderer.java
library/src/main/java/com/google/android/exoplayer/MediaCodecVideoTrackRenderer.java
View file @
be721943
...
@@ -375,31 +375,31 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
...
@@ -375,31 +375,31 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
return
true
;
return
true
;
}
}
if
(
getState
()
==
TrackRenderer
.
STATE_STARTED
&&
earlyUs
<
30000
)
{
if
(
getState
()
!=
TrackRenderer
.
STATE_STARTED
)
{
if
(
Util
.
SDK_INT
>=
21
)
{
return
false
;
// Let the underlying framework time the release.
}
if
(
earlyUs
<
50000
)
{
renderOutputBufferTimedV21
(
codec
,
bufferIndex
,
System
.
nanoTime
()
+
(
earlyUs
*
1000L
));
if
(
Util
.
SDK_INT
>=
21
)
{
return
true
;
// Let the underlying framework time the release.
}
if
(
earlyUs
<
50000
)
{
return
false
;
renderOutputBufferTimedV21
(
codec
,
bufferIndex
,
System
.
nanoTime
()
+
(
earlyUs
*
1000L
));
}
else
{
return
true
;
// We need to time the release ourselves.
}
if
(
earlyUs
<
30000
)
{
}
else
{
if
(
earlyUs
>
11000
)
{
// We need to time the release ourselves.
// We're a little too early to render the frame. Sleep until the frame can be rendered.
if
(
earlyUs
<
30000
)
{
// Note: The 11ms threshold was chosen fairly arbitrarily.
if
(
earlyUs
>
11000
)
{
try
{
// We're a little too early to render the frame. Sleep until the frame can be rendered.
// Subtracting 10000 rather than 11000 ensures the sleep time will be at least 1ms.
// Note: The 11ms threshold was chosen fairly arbitrarily.
Thread
.
sleep
((
earlyUs
-
10000
)
/
1000
);
try
{
}
catch
(
InterruptedException
e
)
{
// Subtracting 10000 rather than 11000 ensures the sleep time will be at least 1ms.
Thread
.
currentThread
().
interrupt
();
Thread
.
sleep
((
earlyUs
-
10000
)
/
1000
);
}
}
catch
(
InterruptedException
e
)
{
Thread
.
currentThread
().
interrupt
();
}
}
renderOutputBufferImmediate
(
codec
,
bufferIndex
);
return
true
;
}
}
return
false
;
renderOutputBufferImmediate
(
codec
,
bufferIndex
);
return
true
;
}
}
}
}
...
...
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