-
Notifications
You must be signed in to change notification settings - Fork 379
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
Player- once complete video again not play #382
Comments
Maybe you can check this issues/291. |
Are you calling |
I'm seeing this issue too, these are my setup details:
My code is really simple: @Override
public void onCompletion() {
Log.d("onCompletion", "player restart:" + Boolean.toString(player.restart()));
} Logcat: D/onCompletion: player restart:true
I/OMXClient: Using client-side OMX mux.
E/BufferQueue: [unnamed-30723-0] connect: already connected (cur=1, req=3)
E/MediaCodec: native_window_api_connect returned an error: Invalid argument (-22)
E/dalvikvm: Could not find class 'android.media.MediaCodec$CodecException', referenced from method com.google.android.exoplayer.MediaCodecTrackRenderer$DecoderInitializationException.getDiagnosticInfoV21
W/dalvikvm: VFY: unable to resolve instanceof 166 (Landroid/media/MediaCodec$CodecException;) in Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;
D/dalvikvm: VFY: replacing opcode 0x20 at 0x0000
E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.MediaCodecTrackRenderer$DecoderInitializationException: Decoder init failed: OMX.MS.AVC.Decoder, MediaFormat(1, video/avc, -1, 109288, 1920, 1080, 0, 1.0, -1, -1, null, 60000000, false, -1, -1, -1, -1, -1)
at com.google.android.exoplayer.MediaCodecTrackRenderer.notifyAndThrowDecoderInitError(MediaCodecTrackRenderer.java:427)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:413)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:800)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: com.google.android.exoplayer.MediaCodecTrackRenderer$DecoderInitializationException: Decoder init failed: OMX.MS.AVC.Decoder, MediaFormat(1, video/avc, -1, 109288, 1920, 1080, 0, 1.0, -1, -1, null, 60000000, false, -1, -1, -1, -1, -1)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:413)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:800)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: java.lang.IllegalStateException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:262)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.configureCodec(MediaCodecVideoTrackRenderer.java:328)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:402)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:800)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) This is the video I'm trying to restart, it's a 1920x1080 mp4. |
OK, I'll look in to this when I have some time (soon) |
It does work sometimes; I would exclude network connection problems, since the files are served from a local webserver. I will test with more device at the same moment tomorrow. |
Yeah, It looks like something is not getting cleaned up correctly and therefore entering a bad state. |
I ran some tests with 5 devices contemporaneously. Zidoo X9 1 4.4.4: 4, 4, 1 Sadly I don't have other KitKat devices to test this issue, could also be device specific. |
I have a Nexus 4 with 4.4.4 on it, so I'll verify if that is or isn't the issue. |
I'm not seeing this on the 4.0 branch with my Nexus 4 (4.4.4), would you mind checking with the listed devices? |
Hi @brianwernick , still crashing with a very similar error:
|
Any updates on this? This bug comes up even in the most simplistic setup (as in the README) I'm using a temporary workaround:
|
Also finding this, just setup purely from the example. Can watch a video half way, then drag it back to the beginning and everything works fine, however if it hits the end, it can no longer be re-played |
Any updates on this? Is there any workaround in case I don't want the video to start immediately after finish (so |
In my case, I added a button with replay icon and I made
|
On a Pixel with Oreo. Not seeing anything in the logs, but when a video finishes the progress bar shows and I cannot start playing it again. The only way I can get it to work is to call |
@brianwernick video keeps on playing in loop what we need is once played on completion it should stop and onclick of play button it should play again. |
This is still happening, including in 5.0. Once the video runs to the end, seeking to the middle results in an infinite loading spinner. |
I use this lib to integrate and load video first time it played and restart is not available and if once complete video then no option to play again and if play again it not play a video(not more then onetime play a video)
The text was updated successfully, but these errors were encountered: