mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +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
|
||||
public int read() throws IOException {
|
||||
read(singleByteArray);
|
||||
return singleByteArray[0] & 0xFF;
|
||||
int length = read(singleByteArray);
|
||||
if(length != -1) {
|
||||
return singleByteArray[0] & 0xFF;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue