diff options
author | Lajos Molnar <lajos@google.com> | 2014-10-22 21:27:05 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-22 21:27:05 +0000 |
commit | 11f437a6665167d8aee6db59df6e4753aa190bf7 (patch) | |
tree | 77f97ebb0df77973fb9c6c359600d7e9f1f29802 /media/libstagefright/omx | |
parent | ccaf667eb6e96a28caedb0d4f776b1ff9c4aed10 (diff) | |
parent | edcff417bbb2e76245b559e7c9a8b98c2a60e102 (diff) | |
download | frameworks_av-11f437a6665167d8aee6db59df6e4753aa190bf7.zip frameworks_av-11f437a6665167d8aee6db59df6e4753aa190bf7.tar.gz frameworks_av-11f437a6665167d8aee6db59df6e4753aa190bf7.tar.bz2 |
am edcff417: am 42aae0c4: am f04e8b5e: am 25842048: Merge "stagefright: try to free codec instance if MediaCodec.release hangs" into lmp-dev
* commit 'edcff417bbb2e76245b559e7c9a8b98c2a60e102':
stagefright: try to free codec instance if MediaCodec.release hangs
Diffstat (limited to 'media/libstagefright/omx')
-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 |