mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Merge pull request #429 from gitanuj/datasourceinputstream-fix
Fix DataSourceInputStream.read() for EOF cases
This commit is contained in:
commit
ab402bd13e
1 changed files with 5 additions and 2 deletions
|
|
@ -58,8 +58,11 @@ public class DataSourceInputStream extends InputStream {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read() throws IOException {
|
public int read() throws IOException {
|
||||||
read(singleByteArray);
|
int length = read(singleByteArray);
|
||||||
return singleByteArray[0] & 0xFF;
|
if(length != -1) {
|
||||||
|
return singleByteArray[0] & 0xFF;
|
||||||
|
}
|
||||||
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue