ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Black Screen at times followed by BufferQueue has been abandoned when trying to release

Open giridharkannan opened this issue 2 years ago • 11 comments

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 bugreport to [email protected] after filing this issue.

giridharkannan avatar Dec 07 '22 04:12 giridharkannan

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?

christosts avatar Dec 09 '22 12:12 christosts

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

giridharkannan avatar Dec 09 '22 12:12 giridharkannan

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.

christosts avatar Dec 09 '22 14:12 christosts

Will take an bug report and will send the output to you then

giridharkannan avatar Dec 09 '22 16:12 giridharkannan

We had a cyclone at our place and the internet was disrupted, will continue my test and will share the bugreport at the earliest

giridharkannan avatar Dec 14 '22 06:12 giridharkannan

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]

giridharkannan avatar Dec 14 '22 11:12 giridharkannan

Same issue here.

ridanasif avatar Jan 07 '23 16:01 ridanasif

@giridharkannan have you found the solution?

TarunSainiZO avatar Jan 10 '23 07:01 TarunSainiZO

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.

christosts avatar Jan 12 '23 16:01 christosts

@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

giridharkannan avatar Jan 25 '23 07:01 giridharkannan

@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

giridharkannan avatar Jan 25 '23 07:01 giridharkannan