shithub: openh264

Download patch

ref: 8db97925a533c874b6e7887aefd60af39cbf2198
parent: d767e216a8312907dd8c03f12f3e4741b603c852
author: Martin Storsjö <[email protected]>
date: Sat Mar 1 20:22:08 EST 2014

Add const to string parameters in WelsThreadLib

--- a/codec/common/WelsThreadLib.cpp
+++ b/codec/common/WelsThreadLib.cpp
@@ -268,7 +268,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);
@@ -280,7 +280,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);