-
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
Infinite seeking for duration in MPEG-TS with fixed Content-Length #8090
Comments
This is how http communication looks like:
|
if input.peekFully(packetBuffer.getData(), /* offset= */ 0, bytesToSearch);
...
OkHttpDataSource.skipInternal() BTW, it looks like |
After digging around I'm not sure how it can be solved/workarounded properly on ExoPlayer side.
|
Block seeking for 64Mb+ range if server does not support partial requests;
Could you describe where the bug is on the ExoPlayer side? Based on the block in your first comment it looks like the input length is increasing past the content length returned by the server, which looks wrong. TsExtractor won't try to determine the duration by reading the end of the file if the data source has an unset length (for progressively growing streams). |
I was checking this issue in 2 cases:
In both cases ExoPlayer hangs in preparation stage. First log with growing // OkHttpDataSource.open()
// If we requested a range starting from a non-zero position and received a 200 rather than a
// 206, then the server does not support partial requests. We'll need to manually skip to the
// requested position.
bytesToSkip = responseCode == 200 && dataSpec.position != 0 ? dataSpec.position : 0; And So, here is "issue" on ExoPlayer side:
And here is "improvement" for ExoPlayer. If issue above is fixed or okhttp data source is used:
With provided media server declares it's content as 900Mb and it does not support ranged request (despite it's |
We'll fix this. Thanks for reporting!
I don't think it's really worth spending time on trying to handle this case. It's really an issue with the server, and it's not something we've seen reported before. Any client side solution would also need to pick an arbitrary threshold of some kind at which to "give up". |
Marking as a bug to resolve the |
Issue: #8090 #minor-release PiperOrigin-RevId: 342638922
Issue: #8090 #minor-release PiperOrigin-RevId: 342638922
[REQUIRED] Issue description
MPEG-TS stream (as http progressive) served with fixed
Content-Length
(ignoringRange
) (imitating live streaming?) never finishes preparing stage keeping seeking inTsDurationReader.readLastPcrValue()
:This is clearly an issue on IPTV server side, but it would be nice if ExoPlayer stand firm against flawed media.
[REQUIRED] Reproduction steps
Content-Length: 900000000
[REQUIRED] Link to test content
sent to email
[REQUIRED] A full bug report captured from the device
not applicable
[REQUIRED] Version of ExoPlayer being used
[REQUIRED] Device(s) and version(s) of Android being used
not applicable
The text was updated successfully, but these errors were encountered: