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

Why can't remove playview from its parent or call clearSurface in 2.8.1 #4335

Closed
imcloud opened this issue Jun 1, 2018 · 0 comments
Closed

Comments

@imcloud
Copy link

imcloud commented Jun 1, 2018

ExoPlayer version = 2.8.1

I called this after start play

removeSelf(playerView);

OR

player.clearVideoSurface();

then got this error

E/ACodec: new surface holds onto more buffers (2) than planned for (1)
E/ExoPlayerImplInternal: Internal runtime error.
                         java.lang.IllegalArgumentException
                             at android.media.MediaCodec.native_setSurface(Native Method)
                             at android.media.MediaCodec.setOutputSurface(MediaCodec.java:1810)
                             at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:915)
                             at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:405)
                             at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:372)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:861)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:829)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:811)
                             at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:328)
                             at android.os.Handler.dispatchMessage(Handler.java:107)
                             at android.os.Looper.loop(Looper.java:207)
                             at android.os.HandlerThread.run(HandlerThread.java:61)

And, first call player.stop() will no error but lost player state

qs1: what is this mean?
qs2: how can I switch surface and keep player state


UPDATE

caused by configChange, activity call oncreate twice

@imcloud imcloud closed this as completed Jun 1, 2018
@google google locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant