diff options
author | Lajos Molnar <lajos@google.com> | 2014-10-21 16:07:52 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-10-21 16:14:11 -0700 |
commit | 30358faf33fb9b638257b017fadb4c5f7352d903 (patch) | |
tree | 9cf39ac9b04a8de88c5b1dbd40d2c8631efc2115 /media/libstagefright/omx/OMXNodeInstance.cpp | |
parent | 7de5ac1f067ec61f7ea424d5534cfd40987b11fa (diff) | |
download | frameworks_av-30358faf33fb9b638257b017fadb4c5f7352d903.zip frameworks_av-30358faf33fb9b638257b017fadb4c5f7352d903.tar.gz frameworks_av-30358faf33fb9b638257b017fadb4c5f7352d903.tar.bz2 |
stagefright: try to free codec instance if MediaCodec.release hangs
Bug: 18033275
Change-Id: If86cd26566d7b75941976f37829bbec619800778
Diffstat (limited to 'media/libstagefright/omx/OMXNodeInstance.cpp')
-rw-r--r-- | media/libstagefright/omx/OMXNodeInstance.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index d07ec14..f9c84e2 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -149,6 +149,11 @@ static status_t StatusFromOMXError(OMX_ERRORTYPE err) { status_t OMXNodeInstance::freeNode(OMXMaster *master) { static int32_t kMaxNumIterations = 10; + // exit if we have already freed the node + if (mHandle == NULL) { + return OK; + } + // Transition the node from its current state all the way down // to "Loaded". // This ensures that all active buffers are properly freed even |