diff options
Diffstat (limited to 'media/libstagefright/omx/SimpleSoftOMXComponent.cpp')
-rw-r--r-- | media/libstagefright/omx/SimpleSoftOMXComponent.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp index 179b2a0..f7330f3 100644 --- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp +++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp @@ -45,7 +45,11 @@ SimpleSoftOMXComponent::SimpleSoftOMXComponent( PRIORITY_AUDIO); } -SimpleSoftOMXComponent::~SimpleSoftOMXComponent() { +void SimpleSoftOMXComponent::prepareForDestruction() { + // The looper's queue may still contain messages referencing this + // object. Make sure those are flushed before returning so that + // a subsequent dlunload() does not pull out the rug from under us. + mLooper->unregisterHandler(mHandler->id()); mLooper->stop(); } |