ExoPlayer
ExoPlayer copied to clipboard
Black Screen at times followed by BufferQueue has been abandoned when trying to release
ExoPlayer Version
2.18.1
Devices that reproduce the issue
TX3mini+ TV box
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Unable to reproduce consistently
Expected result
There is an high possibility that this is an device specific issue, but I would like Exoplayer to throw an error when the SurfaceView is not blit with any data, instead of getting stuck indefinitely without reaching Player.STATE_ENDED
Actual result
At times an normally working video will not blit anything on the surfaceview after STATE_READY state.
Also I am getting the following error when trying to release player
12-06 19:42:41.992 19441 19441 I ExoPlayerImpl: Release b8d8dd [ExoPlayerLib/2.18.1] [p281, TX3mini+, Google, 30] [goog.exo.core, goog.exo.ui, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource, goog.exo.extractor]
12-06 19:42:44.008 19441 28661 E BufferQueueProducer: [SurfaceTexture-0-19441-118](id:4bf1000000ef,api:3,p:19441,c:19441) dequeueBuffer: BufferQueue has been abandoned
12-06 19:42:44.008 19441 28661 E ACodec : dequeueBuffer failed: NO_INIT(-19).
12-06 19:42:44.011 19441 28657 D CCodecBuffers: [c2.android.aac.decoder#219:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 0
12-06 19:42:44.011 19441 28657 D CCodecBuffers: [c2.android.aac.decoder#219:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 1
12-06 19:42:44.011 19441 28657 D CCodecBuffers: [c2.android.aac.decoder#219:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 2
12-06 19:42:44.011 19441 28657 D CCodecBuffers: [c2.android.aac.decoder#219:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 3
Media
https://user-images.githubusercontent.com/1427017/206360721-b8153684-0bbb-4794-817d-d3d456d0d100.mp4
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
I don't understand the problem exactly. Is the problem that there are no video frames shown on the surface after playback starts? Can you describe the steps the app is doing and when the problem occurs?
The error log seems to be a separate issue to the problem you are describing, right?
Yes, and the issue is not consistent, the same video will play properly at times and at times will have the black screen issue. Right now, when the issue occurs (when we identify the frame is not blit even after moving to PLAY state), we call player.release()
Also, the error log is related to this issue and occurs when player.release() is called
If this is device specific, it will be hard for us to assist since we will not be able to reproduce. Have you tried reproducing this using the demo app with your content on the specific device? If the issue does not reproduce with the demo app, then it could point to how your app is using the player.
In general, the player detects something went wrong through MediaCodec (I'm assuming you're using the platform decoders), and I am not aware of an API to detect that frames are not actually shown. If MediaCodec raises an error, playback stops.
Maybe we can assist by inspecting a bug report. When you see the problematic behavior, please take a bug report via adb bugreport and attach it here or email it to [email protected] with subject Issue #10843 and update this issue that you've done so.
Will take an bug report and will send the output to you then
We had a cyclone at our place and the internet was disrupted, will continue my test and will share the bugreport at the earliest
Was able to reproduce the issue when playing multiple videos simultaneously, so was not able to use DemoApp. Have set the bugreport to [email protected]
Same issue here.
@giridharkannan have you found the solution?
We had a cyclone at our place and the internet was disrupted, will continue my test and will share the bugreport at the earliest
Hope everything is ok.
Was able to reproduce the issue when playing multiple videos simultaneously, so was not able to use DemoApp. Have set the bugreport to [email protected]
I don't see the demo app's logs (they are tagged with EventLogger) in the bug-report, though there are logs for 3 playback attempts. Was the bug-report taken using the ExoPlayer demo app? I do see plenty of platform decoder errors being logged, but without the demo app's logs I can't tell if the the platform raised any errors to ExoPlayer.
@TarunSainiZO No, but we added an workaround to check if first frame was blit using onRenderedFirstFrame method in AnalyticsListener.
If the frame is not blit, we force stop the video and move to next
@christosts I can't use the demo app because we play multiple videos at the same time. We haven't changed any code in ExoPlayer (have extended few classes though).
If I have to enable any setting to enable EventLogger, I can do that