lsjwzh / lsjwzh/ExoPlayerCompat

blockingClearSurface cause IllegalStateException

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Hi, I've just noticed that some methods in the wrapper seems not working.
Steps:
1) I've playing player, all is okay
2)I've called the method
public void blockingClearSurface() {
surface = null;
pushSurfaceAndVideoTrack(true);
}
from ExoPlayerWrapper.
3) I've called setSurface(..) with legal Surface, but demo app crashes with log like:

09-28 20:19:37.774 511-960/com.conax.golive.access.defaultOperator E/ExoPlayerImplInternal﹕ Internal runtime error.
java.lang.IllegalStateException: buffer was freed
at java.nio.DirectByteBuffer.checkNotFreed(DirectByteBuffer.java:557)
at java.nio.DirectByteBuffer.checkIsAccessible(DirectByteBuffer.java:549)
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:352)
at com.conax.util.binary.bytes.data.custom.PreallocatedBufferBytesData.writeToByteBuffer(PreallocatedBufferBytesData.java:155)
at com.conax.util.binary.bytes.Bytes.writeToByteBuffer(Bytes.java:495)
at com.google.android.exoplayer.conaxhls.HLSTrack.readOneSample(HLSTrack.java:138)
at com.google.android.exoplayer.conaxhls.HLSTrack.readSample(HLSTrack.java:115)
at com.google.android.exoplayer.conaxhls.HLSSampleSource.readData(HLSSampleSource.java:332)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:505)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:400)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:203)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
09-28 20:19:37.799 511-511/com.conax.golive.access.defaultOperator E/com.conax.client.ottaccess.exo.ExoPlayerWrapper﹕ onPlayerError: java.lang.IllegalStateException: buffer was freed

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ExoPlayerWrapper.blockingClearSurface() and trace pushSurfaceAndVideoTrack(true), then reproduce the sequence of clearing and resetting the Surface. Use the supplied IllegalStateException stack trace to follow the failure through ExoPlayerImplInternal and HLSTrack; done means the sequence no longer produces the reported buffer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.