mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpp_thread]: improve reset lock/condition implement
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@428 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -278,16 +278,16 @@ MPP_RET Mpp::reset()
|
||||
mFrames->flush();
|
||||
mFrames->unlock();
|
||||
|
||||
mThreadCodec->reset_lock();
|
||||
mThreadCodec->lock(THREAD_RESET);
|
||||
|
||||
if (mType == MPP_CTX_DEC) {
|
||||
mpp_dec_reset(mDec);
|
||||
mThreadCodec->signal();
|
||||
mThreadCodec->reset_wait();
|
||||
mThreadCodec->wait(THREAD_RESET);
|
||||
} else {
|
||||
mpp_enc_reset(mEnc);
|
||||
}
|
||||
mThreadCodec->reset_unlock();
|
||||
mThreadCodec->unlock(THREAD_RESET);
|
||||
|
||||
return MPP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user