summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2013-05-09 18:36:04 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-06-25 13:53:58 +0800
commit3556fa0e80c339e0f1ec0399a0c550b50a0c6949 (patch)
tree22d5fcdd302bd6cc53aff42215342ff4e8cb2f5a
parentad03345ba32034ed02d364821cdfaf4725312a18 (diff)
h264encode: fix thread lockup issue
Change-Id: I6065525f76796603856f5cebf0468f4a59c4b5b5 Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--test/encode/h264encode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/encode/h264encode.c b/test/encode/h264encode.c
index e34f6b4..7365008 100644
--- a/test/encode/h264encode.c
+++ b/test/encode/h264encode.c
@@ -1841,7 +1841,6 @@ static void storage_task(unsigned long long display_order, unsigned long long en
pthread_mutex_lock(&encode_mutex);
srcsurface_status[display_order % SURFACE_NUM] = SRC_SURFACE_IN_ENCODING;
- pthread_cond_signal(&encode_cond);
pthread_mutex_unlock(&encode_mutex);
}
@@ -1908,9 +1907,7 @@ static int encode_frames(void)
/* check if the source frame is ready */
while (srcsurface_status[current_slot] != SRC_SURFACE_IN_ENCODING) {
- pthread_mutex_lock(&encode_mutex);
- pthread_cond_wait(&encode_cond, &encode_mutex);
- pthread_mutex_unlock(&encode_mutex);
+ usleep(1);
}
tmp = GetTickCount();