When the iOS application is not in the foreground, the hardware encoder and decoder become invalidated. There doesn't seem to be a way to query their state so we don't know they're invalid until we get an error code after an encode/decode request. To solve the issue, we just don't encode/decode when the app is not active, and reinitialize the encoder/decoder when the app is active again. Also fixes a leak in the decoder. BUG=webrtc:4081 Review URL: https://codereview.webrtc.org/1732953003 Cr-Commit-Position: refs/heads/master@{#11916}
Name: WebRTC URL: http://www.webrtc.org Version: 90 License: BSD License File: LICENSE Description: WebRTC provides real time voice and video processing functionality to enable the implementation of PeerConnection/MediaStream. Third party code used in this project is described in the file LICENSE_THIRD_PARTY.