google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

Exoplayer crashes/not able to reinitiate after playing a certain MP4 on Tanix TX6 TV Box #7499

Closed cle-bo closed 4 years ago

cle-bo commented 4 years ago

[REQUIRED] Issue description

The Exoplayer crashes and is not able to restart after playing a certain video file (see middleclip_nok.mp4 in demo app) on the Tanix TX6 TV Box (https://www.gearbest.com/tv-box/pp_009149785586.html?wid=1433363#goodsDetail). The file that causes the problem can be played perfectly fine on another device I own, a Beelink GT1 (https://www.amazon.de/Beelink-Ultimate-Android-S-912-Bluetooth-GT1/dp/B07H3WJPBD).

This is a part of the logcat:

2020-06-12 13:14:35.411 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onDecoderInitialized
2020-06-12 13:14:35.412 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onDecoderInputFormatChanged
2020-06-12 13:14:35.413 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onPositionDiscontinuity
2020-06-12 13:14:35.414 6605-6637/com.airtango.lpsoneplayer D/MediaCodecInfo: NoSupport [sizeAndRate.support, 1920x1080x25.0] [OMX.google.h264.decoder, video/avc] [p281, TX6, Amlogic, 28]
2020-06-12 13:14:35.416 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onTracksChanged
2020-06-12 13:14:35.426 6605-6637/com.airtango.lpsoneplayer E/ExoPlayerImplInternal: Renderer error: index=0, type=video, format=Format(1, null, null, video/avc, null, -1, null, [1920, 1080, 25.0], [-1, -1]), rendererSupport=YES
      com.google.android.exoplayer2.ExoPlaybackException: java.lang.IllegalStateException
        at com.google.android.exoplayer2.BaseRenderer.createRendererException(BaseRenderer.java:359)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:735)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)
     Caused by: java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
        at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2698)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1520)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:721)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 
2020-06-12 13:14:35.434 6605-6637/com.airtango.lpsoneplayer E/ExoPlayerImplInternal: Disable failed.
      java.lang.IllegalStateException
        at android.media.MediaCodec.native_flush(Native Method)
        at android.media.MediaCodec.flush(MediaCodec.java:2131)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:777)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.flushOrReleaseCodec(MediaCodecVideoRenderer.java:724)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:636)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:569)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:168)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1136)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:891)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:850)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:382)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)
2020-06-12 13:14:35.440 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onDroppedVideoFrames
2020-06-12 13:14:35.440 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onDecoderDisabled
2020-06-12 13:14:35.441 6605-6605/com.airtango.lpsoneplayer I/com.airtango.lpsoneplayer.LPSAnalyticsListener: onDecoderDisabled
2020-06-12 13:14:35.449 6605-6637/com.airtango.lpsoneplayer E/ExoPlayerImplInternal: Reset failed.
      java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:2084)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:671)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.releaseCodec(MediaCodecVideoRenderer.java:714)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onReset(MediaCodecRenderer.java:643)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onReset(MediaCodecVideoRenderer.java:578)
        at com.google.android.exoplayer2.BaseRenderer.reset(BaseRenderer.java:175)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:900)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:850)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:382)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)

[REQUIRED] Reproduction steps

The problem can be reproduced with help of the demo app I am going to send via mail.

[REQUIRED] Link to test content

Test content can be found in res.raw folder in the demo app.

[REQUIRED] A full bug report captured from the device

I will send the bugreport via mail.

[REQUIRED] Version of ExoPlayer being used

implementation 'com.google.android.exoplayer:exoplayer:2.11.4'

[REQUIRED] Device(s) and version(s) of Android being used

Tanix TX6 TV Box, running with Android 9 (28).

AquilesCanta commented 4 years ago

Have you tried playing the file in the ExoPlayer demo app? If the file plays on the problematic device using the ExoPlayer demo app, it's likely that there's something wrong in the app you are using to play the file. In general, unless you are testing a specific feature that's not available in the ExoPlayer demo app, please just use the ExoPlayer demo app to test and report playback issues.

If this is a device specific issue, I suggest you report the issue to the device manufacturer. I don't think there's evidence suggesting this is an ExoPlayer issue. If you have such evidence, please share it with us so we can take a look.

sibghat777 commented 4 years ago

I am also facing this issue. any idea how to fix it?

ExoPlayerImplInternal: Renderer error: index=0, type=video, format=Format(1, null, null, video/avc, null, -1, null, [1080, 1080, 30.000002], [-1, -1]), rendererSupport=YES
      com.google.android.exoplayer2.ExoPlaybackException: java.lang.IllegalStateException
        at com.google.android.exoplayer2.BaseRenderer.createRendererException(BaseRenderer.java:359)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:735)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
        at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2698)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1520)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:721)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 
2020-06-17 10:54:28.702 32107-5586/com.littglobal.litt E/ExoPlayerImplInternal: Disable failed.
      java.lang.IllegalStateException
        at android.media.MediaCodec.native_flush(Native Method)
        at android.media.MediaCodec.flush(MediaCodec.java:2131)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:777)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.flushOrReleaseCodec(MediaCodecVideoRenderer.java:724)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:636)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:569)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:168)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1136)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:891)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:850)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:382)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:65)
google-oss-bot commented 4 years ago

Hey @cle-bo. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@cle-bo if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.