Skip to content
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

Silent failure with too small of a sample buffer #583

Closed
whatisaphone opened this issue Jun 26, 2015 · 2 comments
Closed

Silent failure with too small of a sample buffer #583

whatisaphone opened this issue Jun 26, 2015 · 2 comments

Comments

@whatisaphone
Copy link

I just spent more time then I'd like to admit debugging ExoPlayer silently failing to play streams (more specifically, hanging in STATE_BUFFERING indefinitely with no error reported). I traced the problem back to ExtractorSampleSource's requestedBufferSize parameter being too small (in my case, 32KB—I made a mistaken assumption about what this parameter meant). In my case, with Mp3Extractor, 32KB is too small, and 256KB works, but I decided to just use 10MB as per the demo project.

To prevent people from going through what I went through, maybe an error should be thrown in cases like this instead of silent failure. I don't know which component was at fault. The docs imply that more will be allocated if the value provided is too small, but this didn't happen in my case.

@ojw28
Copy link
Contributor

ojw28 commented Jun 30, 2015

I want to make ExtractorSampleSource use LoadControl, which will help to solve this problem (DefaultLoadControl allows you to specify lower limits on the buffer in both bytes and time, the latter of which makes it much harder for you to accidentally get this wrong).

@ojw28
Copy link
Contributor

ojw28 commented Aug 31, 2016

Fixed in dev-v2.

@ojw28 ojw28 closed this as completed Aug 31, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants