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()) {
|
if (Thread.interrupted()) {
|
||||||
throw new InterruptedException();
|
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) {
|
if (bytesRead == -1) {
|
||||||
isEnded = true;
|
isEnded = true;
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
remaining -= bytesRead;
|
remaining -= bytesRead;
|
||||||
}
|
}
|
||||||
position += length;
|
position += length;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user