question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release codec resources hold by other apps

See original GitHub issue

[REQUIRED] Searched documentation and issues

Topics: #5799, #6107, #5516, #5219

[REQUIRED] Question

We’ve recently started to see increased rate of following error:

MediaCodecRenderer$DecoderInitializationException: Decoder init failed (AVC)

This occurs mostly on Huewei devices so we started to investigate there. I’ve came across above mentioned topics. It looks like a problem with releasing decoder resources, so I’ve looked at our code which is responsible for releasing the player and it looks ok.

It turns out that eg. for Huawei P20 Pro there’s only one shared AVC decoder instance available -> I’ve made a quick test:

  1. Play video in our app -> works fine
  2. Run eg. TED application
  3. Start video in TED app
  4. Minimize TED app
  5. Go back to our app
  6. Try to play video -> fail DecoderInitializationException
  7. Kill TED app
  8. Go back to our app
  9. Try to play video -> works fine

Is there any way to release programatically codec resources which are used by another app? This is quite a significant problem for us.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
toniheicommented, Aug 20, 2019

Indeed, when TED is minimized the audio is playing in the background (it starts foreground service). I need to check how other popular apps behave.

We also tried to reach out to the TED developers to make them aware of the issue.

0reactions
rafakobcommented, Aug 20, 2019

Thank you, guys! I think I got everything I needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improved decoder reuse in ExoPlayer | by Olly Woodman
This post describes what's changed, and what you need to do to make sure that your app benefits from the improvements. The importance...
Read more >
MediaCodec - Android Developers
While you are not required to resubmit/release buffers immediately to the codec, holding onto input and/or output buffers may stall the codec, ...
Read more >
Feature Configuration Guide for Cisco Unified Communications ...
Step 1. From Cisco Unified CM Administration, choose Media Resources > Music On Hold Audio Source. ; Step 2. Do either of the...
Read more >
Web video codec guide - Web media technologies | MDN
This guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any ......
Read more >
Commander and i-Mix G3 Support - Tieline
It is now possible to configure a 'Hangup Profile' in G3 codecs. This means a codec can receive calls from other codecs that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found