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
3b34b068
authored
Jul 21, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Handle the last MP3 sample being truncated without throwing.
Issue: #599
parent
ed2b6565
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
library/src/main/java/com/google/android/exoplayer/extractor/mp3/Mp3Extractor.java
library/src/main/java/com/google/android/exoplayer/extractor/mp3/Mp3Extractor.java
View file @
3b34b068
...
...
@@ -113,9 +113,12 @@ public final class Mp3Extractor implements Extractor {
sampleBytesRemaining
-=
inputBuffer
.
drainToOutput
(
trackOutput
,
sampleBytesRemaining
);
if
(
sampleBytesRemaining
>
0
)
{
inputBuffer
.
mark
();
try
{
sampleBytesRemaining
-=
trackOutput
.
sampleData
(
extractorInput
,
sampleBytesRemaining
);
}
catch
(
EOFException
e
)
{
return
RESULT_END_OF_INPUT
;
}
// Return if we still need more data.
sampleBytesRemaining
-=
trackOutput
.
sampleData
(
extractorInput
,
sampleBytesRemaining
);
if
(
sampleBytesRemaining
>
0
)
{
return
RESULT_CONTINUE
;
}
...
...
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