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
15d13bdc
authored
Nov 28, 2018
by
andrewlewis
Committed by
Oliver Woodman
Nov 28, 2018
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Handle metadata failing to decode in MetadataRenderer
Issue: #5149 PiperOrigin-RevId: 223121651
parent
017923ed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java
RELEASENOTES.md
View file @
15d13bdc
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
(
[
#4690
](
https://github.com/google/ExoPlayer/issues/4690
)
).
(
[
#4690
](
https://github.com/google/ExoPlayer/issues/4690
)
).
*
Fix issue with applying the
`show_buffering`
attribute in
`PlayerView`
*
Fix issue with applying the
`show_buffering`
attribute in
`PlayerView`
(
[
#5139
](
https://github.com/google/ExoPlayer/issues/5139
)
).
(
[
#5139
](
https://github.com/google/ExoPlayer/issues/5139
)
).
*
Fix issue where null
`Metadata`
was output when it failed to decode
(
[
#5149
](
https://github.com/google/ExoPlayer/issues/5149
)
).
### 2.9.1 ###
### 2.9.1 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java
View file @
15d13bdc
...
@@ -129,12 +129,15 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
...
@@ -129,12 +129,15 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
buffer
.
subsampleOffsetUs
=
formatHolder
.
format
.
subsampleOffsetUs
;
buffer
.
subsampleOffsetUs
=
formatHolder
.
format
.
subsampleOffsetUs
;
buffer
.
flip
();
buffer
.
flip
();
int
index
=
(
pendingMetadataIndex
+
pendingMetadataCount
)
%
MAX_PENDING_METADATA_COUNT
;
int
index
=
(
pendingMetadataIndex
+
pendingMetadataCount
)
%
MAX_PENDING_METADATA_COUNT
;
pendingMetadata
[
index
]
=
decoder
.
decode
(
buffer
);
Metadata
metadata
=
decoder
.
decode
(
buffer
);
if
(
metadata
!=
null
)
{
pendingMetadata
[
index
]
=
metadata
;
pendingMetadataTimestamps
[
index
]
=
buffer
.
timeUs
;
pendingMetadataTimestamps
[
index
]
=
buffer
.
timeUs
;
pendingMetadataCount
++;
pendingMetadataCount
++;
}
}
}
}
}
}
}
if
(
pendingMetadataCount
>
0
&&
pendingMetadataTimestamps
[
pendingMetadataIndex
]
<=
positionUs
)
{
if
(
pendingMetadataCount
>
0
&&
pendingMetadataTimestamps
[
pendingMetadataIndex
]
<=
positionUs
)
{
invokeRenderer
(
pendingMetadata
[
pendingMetadataIndex
]);
invokeRenderer
(
pendingMetadata
[
pendingMetadataIndex
]);
...
...
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