mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Prevent "unexpected read attempt" illegal state exception
When using cronet data source, calling read after the end of input has been read will trigger this. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=184667794
This commit is contained in:
parent
784e8a6344
commit
fea75f2e42
1 changed files with 1 additions and 0 deletions
|
|
@ -369,6 +369,7 @@ public class CronetDataSource extends UrlRequest.Callback implements HttpDataSou
|
|||
throw new HttpDataSourceException(exception, currentDataSpec,
|
||||
HttpDataSourceException.TYPE_READ);
|
||||
} else if (finished) {
|
||||
bytesRemaining = 0;
|
||||
return C.RESULT_END_OF_INPUT;
|
||||
} else {
|
||||
// The operation didn't time out, fail or finish, and therefore data must have been read.
|
||||
|
|
|
|||
Loading…
Reference in a new issue