Skip to content

@remotion/media: Avoid buffering deadlock when a loop starts in silence #10658

Description

@JonnyBurger

When a looped <Video> starts in a silent range between the end of its audio track and the media loop boundary, preview playback can remain stuck in buffering forever.

Reproduction

Use a 10-second video whose audio track ends at 7 seconds, enable loop, and start playback at 8 seconds.

The audio scheduler reaches the next loop pass at 10 seconds, but startup buffering only counts scheduled audible duration. After scheduling the first audio chunk at the scheduler horizon, it waits for the playback clock to advance before scheduling more. The playback clock cannot advance because startup buffering is still waiting for more audible duration.

Expected behavior

Known silent timeline ranges should count as safe buffered coverage, allowing playback to start and reach the next audible loop pass.

Context

Discovered while reproducing #10655 with audio-shorter-than-video.mp4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions