mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
Fix DataSourceInputStream.read() for EOF cases
This commit is contained in:
parent
7f58a0be81
commit
2a06c2641c
@ -58,9 +58,12 @@ public class DataSourceInputStream extends InputStream {
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
read(singleByteArray);
|
||||
int length = read(singleByteArray);
|
||||
if(length != -1) {
|
||||
return singleByteArray[0] & 0xFF;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] buffer) throws IOException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user