-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Shows black screen when app is resumed after video is done playing #11079
Comments
When the app is moved to the background, the player should be destroyed. Upon resume, a new player instance should be created and a first frame should be renderered. Would you be able to provide a bug report with logs? If you're unable to share bug reports or |
Here is the verbose logs when showing black screen from onPause() to onResume(): 2023-04-03 15:58:24.826 15428-15428/com.google.android.exoplayer2.demo D/DecorView[]: onWindowFocusChanged hasWindowFocus false |
Here is logs that shows last frame normal from onPause() to onResume(): 2023-04-03 16:04:49.676 15428-15428/com.google.android.exoplayer2.demo D/DecorView[]: onWindowFocusChanged hasWindowFocus false |
I used the last release-v2 demo with two little changes:
This is a video that last frame is not black。Here is the video file: 16.zip |
Hello @beiger. Thank you for reporting this issue! You were hitting an edge case where the number of samples dequeued from the SampleQueue matched the number of available buffers. The renderer skipped those frames because the end of stream sample was not dequeued during that read. A fix has been put into dev-v2. Here is the link to the commit: 7590228. Hopefully this fixes your problem! |
ExoPlayer Version
2.18.4
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
1.Play video until complete.
2. switch app back and front for several times.
3. show blackscreen sometimes.
To see the effect more clearly, I changed a new video url that last frame is not black。
Expected result
screen resumes with the last frame.
Actual result
sometimes black screen.
Media
FormatFactoryPart3.mp4
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: