-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
First off thank you in advance for taking the time to respond to this question.
Searched documentation and issues
I have searched for related answers on Stack Overflow, existing issues, ExoPlayer Javadoc and the ExoPlayer Developer Website. I also tried the "Similar to # existing issues" on GitHub which as well yielded no result.
Question
Why is the referenceCount in DefaultDrmSession incremented and decremented multiple times by acquire() and release() is called and why are the called multiple times?
Does manually altering the referenceCount to forcefully maintain the session and then forcefully release it cause unforeseen issues? If we need to hold onto this session through add breaks what is an alternative?
Problem and Gathered Information
Version: 2.11
When observing the referenceCount in DefaultDrmSession we see this Integer increment when the session is created and then decrement at the end of a session when the asset is finishing or when the player is released. The count is typically 5 and will decrement and release which is the expected behavior. However, there seems to be an issue arising when we transition to commercial breaks, from protected to clear and back to protected content, the player will release the session. This is not Ideal as it requires another Drm License to be retrieved. Initially, our thought was that this was due to the manifest's structure but after extensive testing we have ruled that out. It seems that MediaCodecRender (Audio/Video) is responsible for calling acquire() and release() but why it is called multiple times is unclear to us. If we alter the referenceCount we are able to prevent this issue from happening however, our lack understanding of this field is causing us concern.