[mpp_thread]: fix invalid thread_join when thread is not started

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@193 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2008-01-25 15:24:28 +00:00
parent 812ab44cfb
commit ef5a60731c

View File

@@ -61,14 +61,16 @@ void MppThread::start()
void MppThread::stop()
{
mStatus = MPP_THREAD_STOPPING;
signal();
if (MPP_THREAD_UNINITED != mStatus) {
mStatus = MPP_THREAD_STOPPING;
signal();
void *dummy;
pthread_join(mThread, &dummy);
thread_dbg(MPP_THREAD_DBG_FUNCTION, "mThread %p mContext %p destroy success\n",
mFunction, mContext);
void *dummy;
pthread_join(mThread, &dummy);
thread_dbg(MPP_THREAD_DBG_FUNCTION, "mThread %p mContext %p destroy success\n",
mFunction, mContext);
mStatus = MPP_THREAD_UNINITED;
mStatus = MPP_THREAD_UNINITED;
}
}