[mpp]: detach listener on mpp deinit

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@496 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-12-02 23:06:03 +00:00
parent d211b7d9c5
commit f14d509778
2 changed files with 5 additions and 0 deletions

View File

@@ -110,6 +110,10 @@ Mpp::~Mpp ()
void Mpp::clear() void Mpp::clear()
{ {
// MUST: release listener here
if (mFrameGroup)
mpp_buffer_group_set_listener((MppBufferGroupImpl *)mFrameGroup, NULL);
if (mThreadCodec) if (mThreadCodec)
mThreadCodec->stop(); mThreadCodec->stop();
if (mThreadHal) if (mThreadHal)

View File

@@ -433,6 +433,7 @@ MPP_RET mpp_buffer_group_set_listener(MppBufferGroupImpl *p, void *listener)
return MPP_ERR_NULL_PTR; return MPP_ERR_NULL_PTR;
} }
Mutex::Autolock auto_lock(&service.mLock);
p->listener = listener; p->listener = listener;
return MPP_OK; return MPP_OK;