mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Fix issue with new extractor input
This commit is contained in:
parent
5e4a35fa7e
commit
e54d07c1b0
1 changed files with 3 additions and 3 deletions
|
|
@ -82,15 +82,15 @@ public final class DataSourceExtractorInput implements ExtractorInput {
|
|||
if (Thread.interrupted()) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
int bytesRead = dataSource.read(SCRATCH_SPACE, 0, remaining);
|
||||
int bytesRead = dataSource.read(SCRATCH_SPACE, 0, Math.min(SCRATCH_SPACE.length, remaining));
|
||||
if (bytesRead == -1) {
|
||||
isEnded = true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
remaining -= bytesRead;
|
||||
}
|
||||
position += length;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue