Skip to content

Player gets stuck on final frame when seeking near end with setScrubbingModeEnabled(true), ignoring subsequent seeks #2964

@Adelyesa

Description

@Adelyesa

Version

Media3 main branch

More version details

Any media3 version where Scrubbing mode is available

Devices that reproduce the issue

Any Android device/not device dependant

Devices that do not reproduce the issue

None

Reproducible in the demo app?

Not tested

Reproduction steps

Description :

When setScrubbingModeEnabled(true) is active, seeking very close to the end of the MediaItem (e.g., last 100ms) causes the player to lock up.

Once the player reaches this end point, it successfully renders the final frame, but subsequent seeks to other positions fail to update the surface. The player remains visually stuck on the final frame regardless of seekTo(0) or seekTo(any_other_time).

This issue is reproducible with standard items but is significantly aggravated when using EditedMediaItem with Effects, likely due to pipeline processing speed mismatch.

Reproduction Steps

Initialize ExoPlayer with an EditedMediaItem (or standard item).

Enable scrubbing mode: player.setScrubbingModeEnabled(true).

Seek to duration - 100ms (or very close to the end).

Observe the final frame is rendered.

Call seekTo any other timestamp.

Analysis & Question
This seems to be a pipeline synchronization issue. Specifically with EditedMediaItem, if the effects pipeline cannot process frames as fast as they are submitted during scrubbing (backpressure), frames should be dropped to keep up.

However, it seems the pipeline creates a deadlock when it drops frames near the EOS. Why is frame skipping not implemented more robustly in the effects pipeline? If the pipeline falls behind, it should skip processing and simply present the target frame, rather than deadlocking or failing to render/causing a player crash because an intermediate frame was dropped.

Expected result

The player should immediately render the frame at the new seek position, updating the surface instantly as per scrubbing mode behavior/normal seeking behavior.

Actual result

The player remains frozen on the final frame. The internal position might update, but the surface does not refresh. It appears the video pipeline enters a state where it stops accepting or processing new seek commands after hitting the end stream signal in scrubbing mode.

Media

Not applicable

Bug Report

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