Merge "Fix failure in ExifInterface on certain HEIF files" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a3a74591b7
@@ -2540,19 +2540,20 @@ public class ExifInterface {
|
||||
if (position < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (mPosition != position) {
|
||||
in.seek(position);
|
||||
mPosition = position;
|
||||
}
|
||||
try {
|
||||
if (mPosition != position) {
|
||||
in.seek(position);
|
||||
mPosition = position;
|
||||
}
|
||||
|
||||
int bytesRead = in.read(buffer, offset, size);
|
||||
if (bytesRead < 0) {
|
||||
mPosition = -1; // need to seek on next read
|
||||
return -1;
|
||||
}
|
||||
|
||||
mPosition += bytesRead;
|
||||
return bytesRead;
|
||||
int bytesRead = in.read(buffer, offset, size);
|
||||
if (bytesRead >= 0) {
|
||||
mPosition += bytesRead;
|
||||
return bytesRead;
|
||||
}
|
||||
} catch (IOException e) {}
|
||||
mPosition = -1; // need to seek on next read
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user