Skip to content
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

ExoPlayerImplInternal: Internal runtime error #259

Open
AlEilers opened this issue Sep 29, 2019 · 2 comments
Open

ExoPlayerImplInternal: Internal runtime error #259

AlEilers opened this issue Sep 29, 2019 · 2 comments

Comments

@AlEilers
Copy link

Since the Nvidia Shield TV was updated to Android 9, I can no longer watch SD Channels only HD channels.

I had a look at the Logcat an saw that the ExoPlayer seems to throw an Exception

2019-09-29 18:33:22.119 3242-3331/? E/OMXNodeInstance: getConfig(0x46f27de0:Nvidia.mpeg2v.decode, ConfigAndroidVendorExtension(0x6f100004)) ERROR: UnsupportedIndex(0x8000101a)
2019-09-29 18:33:22.271 3242-3331/? E/OMXNodeInstance: getConfig(0x46f28020:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2019-09-29 18:33:22.290 3242-9347/? E/SoftMP3: mp3 decoder returned error 1
2019-09-29 18:33:22.291 8660-9346/? E/ACodec: [OMX.google.mp3.decoder] ERROR(0x80001001)
2019-09-29 18:33:22.291 8660-9346/? E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
2019-09-29 18:33:22.291 8660-9346/? E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
2019-09-29 18:33:22.297 8660-9087/? E/ExoPlayerImplInternal: Internal runtime error.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
        at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2874)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:574)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:511)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:479)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:308)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)
2019-09-29 18:33:22.297 8660-8660/? E/ie.macinnes.tvheadend.player.EventLogger: playerFailed [14.49]
    com.google.android.exoplayer2.ExoPlaybackException
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:362)
        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_dequeueInputBuffer(Native Method)
        at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2874)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:574)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:511)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:479)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:308)
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 
2019-09-29 18:33:22.318 8660-9087/? E/ExoPlayerImplInternal: Stop failed.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:2323)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:455)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:409)
        at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:319)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:145)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:709)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:684)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:364)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)
@AlEilers
Copy link
Author

It seems like the audio_version of the Mpeg2AudioStreamReader is not deteminded correctly.

When I hard code mimeType = MimeTypes.AUDIO_MPEG_L2 this Exception isn't occuring.

VLC has no problem finding the correct codec:

Originale ID: 1702
Codec: MPEG Audio layer 1/2 (mpga)
Language: Deutsch
Typ: Audio
Channels: Stereo
Sample Rate: 48000 Hz
Bits per Sample: 32
Bitrate: 192 kB/s

@xhaggi
Copy link

xhaggi commented Jan 15, 2021

Adding the ExoPlayer FfmpegAudioRenderer before the MediaCodecAudioRenderer in TvheadendRenderersFactory#buildAudioRenderers(...) solves the issue with audio_version = 3 aka MimeTypes.AUDIO_MPEG. It looks like MediaCodecAudioRenderer is used to decode MimeTypes.AUDIO_MPEG and it fails.

https://github.com/google/ExoPlayer/tree/release-v2/extensions/ffmpeg#using-the-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants