mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Fix issue with new extractor input
This commit is contained in:
parent
5e4a35fa7e
commit
e54d07c1b0
@ -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…
x
Reference in New Issue
Block a user