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(-) (limited to 'src/video_out') 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(-) (limited to 'src/video_out') 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(-) (limited to 'src/video_out') 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/video_out/video_out_opengl.c | 8 ++++---- src/video_out/video_out_xcbxv.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/video_out') 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