-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CacheWriter doesn't correctly implement allowShortContent case #7326
Labels
Comments
Same issue =/ |
There are a bunch of things that need fixing here:
|
ojw28
changed the title
EOFException when preaload file with CacheUtil.cache()
CacheWriter doesn't correctly implement allowShortContent case
Feb 23, 2021
marcbaechinger
pushed a commit
that referenced
this issue
Feb 24, 2021
Assert that an exception is not thrown from DataSource.open if the DataSpec's start position is valid but its end position extends beyond the end of the data. HTTP based DataSource implementations have no good way of knowing when this is the case, so it makes sense to make this the required behaviour, rather than requiring an exception to be thrown or allowing both. There are also use cases where the caller may want to use the end position as an upper bound, without knowing for sure how long the content is. An example of this use case is wanting to pre-cache the first N bytes of a stream. This implies that any exception should be thrown after reading to the end of the data, rather than preemptively in open. Issue: #7326 PiperOrigin-RevId: 359063721
marcbaechinger
pushed a commit
that referenced
this issue
Feb 24, 2021
Currently, this only asserts that *if* an exception is thrown, it must be a position-out-of-range exception as determined by DataSourceException.isCausedByPositionOutOfRange. Issue: #7326 PiperOrigin-RevId: 359092124
This is still an issue. |
This is fixed in the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[REQUIRED] Searched documentation and issues
Found the article about video preloading here - https://medium.com/google-exoplayer/pre-caching-downloading-progressive-streams-in-exoplayer-3a816c75e8f6
[REQUIRED] Question
Hi! I have an issue when trying to preload the first part of a video. I don't know the exact size of the video so just trying to preload the first 800kb. In case the video is less than 800kb I get
com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: java.io.EOFException
even whenenableEOFException==false
. Is it intentional and how can I solve the issue in the application?A full bug report captured from the device
Not a bug report, just stacktrace
Link to test content
Reproducible sample - https:/temq09/TestExoPlayerCacheUtil
The text was updated successfully, but these errors were encountered: