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
8d9b895f
authored
Jan 22, 2022
by
Dustin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix ID10T timing error
parent
d2bb0c2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
library/core/src/main/java/com/google/android/exoplayer2/video/BitmapFactoryVideoRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/video/BitmapFactoryVideoRenderer.java
View file @
8d9b895f
...
@@ -152,28 +152,15 @@ public class BitmapFactoryVideoRenderer extends BaseRenderer {
...
@@ -152,28 +152,15 @@ public class BitmapFactoryVideoRenderer extends BaseRenderer {
}
}
class
RenderRunnable
implements
Runnable
{
class
RenderRunnable
implements
Runnable
{
final
DecoderInputBuffer
decoderInputBuffer
;
private
DecoderInputBuffer
decoderInputBuffer
;
final
long
renderUs
;
private
final
long
renderUs
;
RenderRunnable
(
final
DecoderInputBuffer
decoderInputBuffer
,
long
renderUs
)
{
RenderRunnable
(
@NonNull
final
DecoderInputBuffer
decoderInputBuffer
,
long
renderUs
)
{
this
.
decoderInputBuffer
=
decoderInputBuffer
;
this
.
decoderInputBuffer
=
decoderInputBuffer
;
this
.
renderUs
=
renderUs
;
this
.
renderUs
=
renderUs
;
}
}
public
void
run
()
{
public
void
run
()
{
synchronized
(
eventDispatcher
)
{
while
(
currentTimeUs
<
renderUs
)
{
try
{
thread
=
Thread
.
currentThread
();
eventDispatcher
.
wait
();
}
catch
(
InterruptedException
e
)
{
//If we are interrupted, treat as a cancel
return
;
}
finally
{
thread
=
null
;
}
}
}
@Nullable
@Nullable
final
ByteBuffer
byteBuffer
=
decoderInputBuffer
.
data
;
final
ByteBuffer
byteBuffer
=
decoderInputBuffer
.
data
;
@Nullable
@Nullable
...
@@ -190,6 +177,21 @@ public class BitmapFactoryVideoRenderer extends BaseRenderer {
...
@@ -190,6 +177,21 @@ public class BitmapFactoryVideoRenderer extends BaseRenderer {
eventDispatcher
.
videoCodecError
(
new
NullPointerException
(
"Decode bytes failed"
));
eventDispatcher
.
videoCodecError
(
new
NullPointerException
(
"Decode bytes failed"
));
return
;
return
;
}
}
decoderInputBuffer
=
null
;
//Wait for time to advance to display the Bitmap
synchronized
(
eventDispatcher
)
{
while
(
currentTimeUs
<
renderUs
)
{
try
{
thread
=
Thread
.
currentThread
();
eventDispatcher
.
wait
();
}
catch
(
InterruptedException
e
)
{
//If we are interrupted, treat as a cancel
return
;
}
finally
{
thread
=
null
;
}
}
}
//Log.d(TAG, "Drawing: " + bitmap.getWidth() + "x" + bitmap.getHeight());
//Log.d(TAG, "Drawing: " + bitmap.getWidth() + "x" + bitmap.getHeight());
final
Canvas
canvas
=
surface
.
lockCanvas
(
null
);
final
Canvas
canvas
=
surface
.
lockCanvas
(
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