[vlc-devel] [PATCH 3/3] opencv_example: silence warning of conversion from string literal to 'char *'

Zhao Zhili quinkblack at foxmail.com
Fri Apr 27 04:36:38 CEST 2018


---
 modules/video_filter/opencv_example.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
index c3a5fe9..66b3d6e 100644
--- a/modules/video_filter/opencv_example.cpp
+++ b/modules/video_filter/opencv_example.cpp
@@ -201,7 +201,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
             *(CvRect*)(&(p_sys->event_info.p_region[i])) = *r;
             p_sys->event_info.p_region[i].i_id = p_sys->i_id++;
-            p_sys->event_info.p_region[i].p_description = "Face Detected";
+            p_sys->event_info.p_region[i].p_description = const_cast<char *>("Face Detected");
         }
 
         if (faces && (faces->total > 0))    //raise the video filter event
-- 
2.9.5





More information about the vlc-devel mailing list