hardware/intel/libva
Revisión | 3556fa0e80c339e0f1ec0399a0c550b50a0c6949 (tree) |
---|---|
Tiempo | 2013-06-25 14:53:58 |
Autor | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Xiang, Haihao |
h264encode: fix thread lockup issue
Change-Id: I6065525f76796603856f5cebf0468f4a59c4b5b5
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -1841,7 +1841,6 @@ static void storage_task(unsigned long long display_order, unsigned long long en | ||
1841 | 1841 | |
1842 | 1842 | pthread_mutex_lock(&encode_mutex); |
1843 | 1843 | srcsurface_status[display_order % SURFACE_NUM] = SRC_SURFACE_IN_ENCODING; |
1844 | - pthread_cond_signal(&encode_cond); | |
1845 | 1844 | pthread_mutex_unlock(&encode_mutex); |
1846 | 1845 | } |
1847 | 1846 |
@@ -1908,9 +1907,7 @@ static int encode_frames(void) | ||
1908 | 1907 | |
1909 | 1908 | /* check if the source frame is ready */ |
1910 | 1909 | 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); | |
1914 | 1911 | } |
1915 | 1912 | |
1916 | 1913 | tmp = GetTickCount(); |