From 3556fa0e80c339e0f1ec0399a0c550b50a0c6949 Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Thu, 9 May 2013 18:36:04 +0800 Subject: [PATCH] h264encode: fix thread lockup issue Change-Id: I6065525f76796603856f5cebf0468f4a59c4b5b5 Signed-off-by: Austin Yuan --- test/encode/h264encode.c | 5 +---- 1 file changed, 1 insertion(+), 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(); -- 2.7.4