Skip to content

Silent failure with too small of a sample buffer #583

@whatisaphone

Description

@whatisaphone

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions