shithub: openh264

Download patch

ref: 6c41cccb814a98b2b4b3ce1d415fadcc38568d5b
parent: 8c7e0a6ac6d99a83174e17e22c640915f2a880a3
parent: 8db97925a533c874b6e7887aefd60af39cbf2198
author: volvet <qizh@cisco.com>
date: Mon Mar 3 03:53:00 EST 2014

Merge pull request #377 from mstorsjo/threadlib-const-str

Add const to string parameters in WelsThreadLib

--- a/codec/common/WelsThreadLib.cpp
+++ b/codec/common/WelsThreadLib.cpp
@@ -262,7 +262,7 @@
   return sem_destroy (event);	// match with sem_init
 }
 
-WELS_THREAD_ERROR_CODE    WelsEventOpen (WELS_EVENT** p_event, char* event_name) {
+WELS_THREAD_ERROR_CODE    WelsEventOpen (WELS_EVENT** p_event, const char* event_name) {
   if (p_event == NULL || event_name == NULL)
     return WELS_THREAD_ERROR_GENERAL;
   *p_event = sem_open (event_name, O_CREAT, (S_IRUSR | S_IWUSR)/*0600*/, 0);
@@ -274,7 +274,7 @@
     return WELS_THREAD_ERROR_OK;
   }
 }
-WELS_THREAD_ERROR_CODE    WelsEventClose (WELS_EVENT* event, char* event_name) {
+WELS_THREAD_ERROR_CODE    WelsEventClose (WELS_EVENT* event, const char* event_name) {
   WELS_THREAD_ERROR_CODE err = sem_close (event);	// match with sem_open
   if (event_name)
     sem_unlink (event_name);
--- a/codec/common/WelsThreadLib.h
+++ b/codec/common/WelsThreadLib.h
@@ -110,8 +110,8 @@
 WELS_THREAD_ERROR_CODE    WelsMutexDestroy (WELS_MUTEX* mutex);
 
 #ifdef __GNUC__
-WELS_THREAD_ERROR_CODE    WelsEventOpen (WELS_EVENT** p_event, char* event_name);
-WELS_THREAD_ERROR_CODE    WelsEventClose (WELS_EVENT* event, char* event_name);
+WELS_THREAD_ERROR_CODE    WelsEventOpen (WELS_EVENT** p_event, const char* event_name);
+WELS_THREAD_ERROR_CODE    WelsEventClose (WELS_EVENT* event, const char* event_name);
 #endif//__GNUC__
 WELS_THREAD_ERROR_CODE    WelsEventInit (WELS_EVENT* event);
 WELS_THREAD_ERROR_CODE    WelsEventDestroy (WELS_EVENT* event);