X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fopencv_wrapper.c;h=24f1be84067548b44874bc431189aa9587c85b3b;hb=79f590d49b6a4c2fb6c8325b4ec4f46078d41f7a;hp=1c0446c06f539af424f9bc512875eb7b579ad9ea;hpb=13ae40b0efc4f1b1ce205d9a057537047fcab3f4;p=vlc diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c index 1c0446c06f..24f1be8406 100644 --- a/modules/video_filter/opencv_wrapper.c +++ b/modules/video_filter/opencv_wrapper.c @@ -32,7 +32,7 @@ # include "config.h" #endif -#include +#include #include #include @@ -66,16 +66,16 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in ); * Module descriptor *****************************************************************************/ -static char *chroma_list[] = { "input", "I420", "RGB32"}; -static char *chroma_list_text[] = { N_("Use input chroma unaltered"), +static const char *const chroma_list[] = { "input", "I420", "RGB32"}; +static const char *const chroma_list_text[] = { N_("Use input chroma unaltered"), N_("I420 - first plane is greyscale"), N_("RGB32")}; -static char *output_list[] = { "none", "input", "processed"}; -static char *output_list_text[] = { N_("Don't display any video"), +static const char *const output_list[] = { "none", "input", "processed"}; +static const char *const output_list_text[] = { N_("Don't display any video"), N_("Display the input video"), N_("Display the processed video")}; -static char *verbosity_list[] = { "error", "warning", "debug"}; -static char *verbosity_list_text[] = { N_("Show only errors"), +static const char *const verbosity_list[] = { "error", "warning", "debug"}; +static const char *const verbosity_list_text[] = { N_("Show only errors"), N_("Show errors and warnings"), N_("Show everything including debug messages")}; vlc_module_begin(); @@ -191,10 +191,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) - { - msg_Err( p_vout, "out of memory" ); return VLC_ENOMEM; - } /* Init structure */ p_vout->p_sys->p_image = image_HandlerCreate( p_vout ); @@ -409,7 +406,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } DEL_PARENT_CALLBACKS( SendEventsToChild ); @@ -558,7 +555,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) ) == NULL ) { - if( p_vout->b_die || p_vout->b_error ) + if( !vlc_object_alive (p_vout) || p_vout->b_error ) { return; } msleep( VOUT_OUTMEM_SLEEP ); }