linkedin / linkedin/LiTr

Crash IllegalStateException MediaCodec.native_dequeueInputBuffer(MediaCodec.java) during compression

Open
#256 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
663
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Hey,

Thanks for this awesome library. I have just implemented the library and release it. When I looked to Crashlytics, I have bunch of crash like below. I could not reproduce the crash so I don't have any user story for that. Do you have any opinion for solution?
```
Fatal Exception: java.lang.IllegalStateException:
at android.media.MediaCodec.native_dequeueInputBuffer(MediaCodec.java)
at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:3039)
at com.linkedin.android.litr.codec.MediaCodecEncoder.dequeueInputFrame(MediaCodecEncoder.java:81)
at com.linkedin.android.litr.render.AudioRenderer$RenderThread.run(AudioRenderer.java:125)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run$bridge(GlideExecutor.java:299)
```

Contributor guide

Open the contributing guide

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 by tracing the MediaCodecEncoder.dequeueInputFrame call at codec/MediaCodecEncoder.java:81 and its invocation from AudioRenderer.java:125. Investigate the MediaCodec lifecycle around native_dequeueInputBuffer and determine the conditions behind the reported IllegalStateException; done means a reproducible cause, a suitable fix, and validation for this crash path.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
audio-video-rtc, mobile
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.