• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

Revisión3556fa0e80c339e0f1ec0399a0c550b50a0c6949 (tree)
Tiempo2013-06-25 14:53:58
AutorAustin Yuan <shengquan.yuan@inte...>
CommiterXiang, Haihao

Log Message

h264encode: fix thread lockup issue

Change-Id: I6065525f76796603856f5cebf0468f4a59c4b5b5
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>

Cambiar Resumen

Diferencia incremental

--- 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
18411841
18421842 pthread_mutex_lock(&encode_mutex);
18431843 srcsurface_status[display_order % SURFACE_NUM] = SRC_SURFACE_IN_ENCODING;
1844- pthread_cond_signal(&encode_cond);
18451844 pthread_mutex_unlock(&encode_mutex);
18461845 }
18471846
@@ -1908,9 +1907,7 @@ static int encode_frames(void)
19081907
19091908 /* check if the source frame is ready */
19101909 while (srcsurface_status[current_slot] != SRC_SURFACE_IN_ENCODING) {
1911- pthread_mutex_lock(&encode_mutex);
1912- pthread_cond_wait(&encode_cond, &encode_mutex);
1913- pthread_mutex_unlock(&encode_mutex);
1910+ usleep(1);
19141911 }
19151912
19161913 tmp = GetTickCount();