From e346ff50cd4cbc37c5961c2c2f36315f06c3525e Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Sun, 22 Mar 2015 07:50:28 +0000 Subject: Fixed #1827: Video port's clock thread may get stuck during format change event git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5012 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/os_core_unix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pjlib/src/pj') diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index 8ec0cdb7..1a9fedd0 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -717,6 +717,9 @@ PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *p) PJ_CHECK_STACK(); + if (p == pj_thread_this()) + return PJ_ECANCELLED; + PJ_LOG(6, (pj_thread_this()->obj_name, "Joining thread %s", p->obj_name)); result = pthread_join( rec->thread, &ret); -- cgit v1.2.3