mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 09:27:54 +00:00
Prevent some IOExceptions when past the end of stream.
This commit is contained in:
@@ -38,6 +38,10 @@ final class ModernEncryptedMediaDataSource extends MediaDataSource {
|
||||
|
||||
@Override
|
||||
public int readAt(long position, byte[] bytes, int offset, int length) throws IOException {
|
||||
if (position >= this.length) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
try (InputStream inputStream = createInputStream(position)) {
|
||||
int totalRead = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user