google / google/ExoPlayer

Allow surface switching without advancing to the next video frame

Open
#5,428 5 comments 0 reactions 1 assignee Claimed by @andrewlewis View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

We are using static instance of Exoplayer, which can attach to/detach from TextureView (e.g. when the orientation changes). When the video is paused, it moves slightly forward every time a surface is set to video renderer via a message (e.g. player.createMessage(videoRenderer).setType(C.MSG_SET_SURFACE).setPayload(surface).send() ). The player position does not change, and seeking to the current position does not prevent frames from changing. When the video is resumed, the frame will stay frozen for a moment (presumably until the current frame is reached), and then will continue normally.

We are currently using Exoplayer 2.8.2, but we were able to reproduce the issue in the test app with v2.9.3 (https://github.com/egorponomarev/Exoplayer-frame-issue-demo).

Steps to reproduce in demo:
- open app and wait for the video to start playing;
- tap on the video to pause it;
- send app to background and then restore it to foreground.

The issue that seems related: https://github.com/google/ExoPlayer/issues/3090

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.