From 1e858fff7528ea81d13b0cf718222e737299a607 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Wed, 11 Jan 2012 15:19:24 +0200 Subject: Fixed #include --- src/libspudvb/xine_spudvb_decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index 8d581a23e..1ab52b7e7 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -25,8 +25,9 @@ * - Implement support for teletext based subtitles */ -#include "pthread.h" +#include #include + #include "xine_internal.h" #include "bswap.h" #include "osd.h" -- cgit v1.2.3 From 27796b7dd43b9ca776d8d907a42c7a464e30098f Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Wed, 11 Jan 2012 15:22:13 +0200 Subject: Fixed pointer casts * * * Fixed pointer cast --- src/post/audio/stretch.c | 2 +- src/post/audio/upmix_mono.c | 2 +- src/post/deinterlace/xine_plugin.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c index f8047e183..e315b11a8 100644 --- a/src/post/audio/stretch.c +++ b/src/post/audio/stretch.c @@ -643,7 +643,7 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs, pthread_mutex_init (&this->lock, NULL); - set_parameters ((xine_post_t *)&this->post, &init_params); + set_parameters (&this->post.xine_post, &init_params); port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output); port->new_port.open = stretch_port_open; diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c index 43fe3df0d..1e5e05549 100644 --- a/src/post/audio/upmix_mono.c +++ b/src/post/audio/upmix_mono.c @@ -315,7 +315,7 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs pthread_mutex_init (&this->lock, NULL); - set_parameters ((xine_post_t *)&this->post, &init_params); + set_parameters (&this->post.xine_post, &init_params); port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output); port->new_port.open = upmix_mono_port_open; diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index 63270acd7..1ea9e9f53 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -397,7 +397,7 @@ static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int input pthread_mutex_init (&this->lock, NULL); - set_parameters ((xine_post_t *)&this->post, &class->init_param); + set_parameters (&this->post.xine_post, &class->init_param); port = _x_post_intercept_video_port(&this->post, video_target[0], &input, &output); /* replace with our own get_frame function */ -- cgit v1.2.3 From be17259906a90ce5f6338e56d397cb99be4b3cbc Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 12 Jan 2012 14:29:45 +0200 Subject: Fixed leak --- src/post/deinterlace/xine_plugin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index 1ea9e9f53..c9d451b4f 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -449,6 +449,7 @@ static void deinterlace_dispose(post_plugin_t *this_gen) if (_x_post_dispose(this_gen)) { _flush_frames(this); pthread_mutex_destroy(&this->lock); + free(this->tvtime); free(this); } } -- cgit v1.2.3 From 9c673be406d023c46e816a0a89bf8171a5be7e79 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 12 Jan 2012 14:50:21 +0200 Subject: Fixed pointer cast --- src/video_out/video_out_xvmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index f06f0cf3f..aeb50271a 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -790,7 +790,7 @@ static void xvmc_update_frame_format (vo_driver_t *this_gen, frame->ratio = ratio; } - xvmc->macroblocks = (xine_macroblocks_t *)&this->macroblocks; + xvmc->macroblocks = &this->macroblocks.xine_mc; this->macroblocks.num_blocks = 0; this->macroblocks.macroblockptr = this->macroblocks.macroblockbaseptr; this->macroblocks.xine_mc.blockptr = -- cgit v1.2.3 From 2f4591b336883490ee3d14ad397de91f98fe376e Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 12 Jan 2012 14:54:08 +0200 Subject: Fixed pointer type --- src/video_out/video_out_fb.c | 2 +- src/video_out/video_out_raw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index c8697694e..aa066c9c7 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -92,7 +92,7 @@ typedef struct fb_frame_s vo_scale_t sc; - uint8_t *chunk[3]; /* mem alloc by xmalloc_aligned */ + void *chunk[3]; /* mem alloc by xmalloc_aligned */ yuv2rgb_t *yuv2rgb; /* yuv2rgb converter for this frame */ uint8_t *rgb_dst; diff --git a/src/video_out/video_out_raw.c b/src/video_out/video_out_raw.c index 860efdfb7..456b3392f 100644 --- a/src/video_out/video_out_raw.c +++ b/src/video_out/video_out_raw.c @@ -61,7 +61,7 @@ typedef struct { int width, height, format, flags; double ratio; - uint8_t *chunk[4]; /* mem alloc by xmalloc_aligned */ + void *chunk[4]; /* mem alloc by xmalloc_aligned */ uint8_t *rgb, *rgb_dst; yuv2rgb_t *yuv2rgb; /* yuv2rgb converter set up for this frame */ -- cgit v1.2.3 From 2aecfe0bda20fe9ca4bfccd3034ad8655a3c81c4 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 12 Jan 2012 14:56:02 +0200 Subject: Hide "warning: cast from pointer to integer of different size" --- src/video_out/video_out_xcbshm.c | 2 +- src/video_out/video_out_xcbxv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index c93cf8c1e..e3556d8e7 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -870,7 +870,7 @@ static int xshm_gui_data_exchange (vo_driver_t *this_gen, break; case XINE_GUI_SEND_DRAWABLE_CHANGED: - this->window = (xcb_window_t) data; + this->window = (xcb_window_t) (long) data; pthread_mutex_lock(&this->main_mutex); xcb_free_gc(this->connection, this->gc); diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index 78bbc94e6..15cb986d7 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -968,7 +968,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, case XINE_GUI_SEND_DRAWABLE_CHANGED: pthread_mutex_lock(&this->main_mutex); - this->window = (xcb_window_t) data; + this->window = (xcb_window_t) (long) data; xcb_free_gc(this->connection, this->gc); this->gc = xcb_generate_id(this->connection); xcb_create_gc(this->connection, this->gc, this->window, 0, NULL); -- cgit v1.2.3 From c183aac00525f9b15efb7a20bf984af68e40d87a Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 12 Jan 2012 14:57:17 +0200 Subject: Added const --- src/demuxers/demux_real.c | 2 +- src/video_out/video_out_opengl.c | 8 ++++---- src/video_out/video_out_xcbxv.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 19b7794ef..2b14a4207 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -546,7 +546,7 @@ static void real_parse_headers (demux_real_t *this) { lprintf("audio version %d detected\n", version); - char *fourcc_ptr = "\0\0\0"; + const char *fourcc_ptr = "\0\0\0"; switch(version) { case 3: /* Version 3 header stores fourcc after meta info - cheat by reading backwards from the diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 751e39991..3f3000523 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -224,7 +224,7 @@ typedef void *(*thread_run_t)(void *); typedef struct { /* Name of render backend */ - char *name; + const char * const name; /* Finally display current image (needed for Redraw) */ void (*display)(opengl_driver_t *, opengl_frame_t *); /* Upload new image; Returns 0 if failed */ @@ -673,7 +673,7 @@ static int render_image_envtex (opengl_driver_t *this, opengl_frame_t *frame) { /* * Render setup functions */ -static int render_help_verify_ext (opengl_driver_t *this, char *ext) { +static int render_help_verify_ext (opengl_driver_t *this, const char *ext) { int ret = 0; const size_t l = strlen (ext); const char *e; @@ -924,7 +924,7 @@ static int render_setup_torus (opengl_driver_t *this) { static int render_setup_fp_yuv (opengl_driver_t *this) { GLint errorpos; int ret; - static char *fragprog_yuv = + static const char *fragprog_yuv = "!!ARBfp1.0\n" "ATTRIB tex = fragment.texcoord[0];" "PARAM off = program.env[0];" @@ -1821,7 +1821,7 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, const v config_values_t *config = class->xine->config; x11_visual_t *visual = (x11_visual_t *) visual_gen; opengl_driver_t *this; - char **render_fun_names; + const char **render_fun_names; int i; this = (opengl_driver_t *) calloc(1, sizeof(opengl_driver_t)); diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index 15cb986d7..1f580bd69 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1130,9 +1130,9 @@ static int xv_check_yv12(xcb_connection_t *connection, xcb_xv_port_t port) { static void xv_check_capability (xv_driver_t *this, int property, xcb_xv_attribute_info_t *attr, int base_id, - char *config_name, - char *config_desc, - char *config_help) { + const char *config_name, + const char *config_desc, + const char *config_help) { int int_default; cfg_entry_t *entry; const char *str_prop = xcb_xv_attribute_info_name(attr); -- cgit v1.2.3