From fc97fb46d693697ef65f008f7a38a3797599e4cb Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 15 Dec 2011 23:28:25 +0200 Subject: Fixed printf format --HG-- branch : point-release --- src/video_out/video_out_xv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 1404871d4..af1752158 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1429,8 +1429,8 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * if (xv_port != 0) { if (! xv_open_port(this, xv_port)) { xprintf(class->xine, XINE_VERBOSITY_NONE, - _("%s: could not open Xv port %"PRId32" - autodetecting\n"), - LOG_MODULE, xv_port); + _("%s: could not open Xv port %lu - autodetecting\n"), + LOG_MODULE, (unsigned long)xv_port); xv_port = xv_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, xv_port, prefer_type); } else adaptor_num = xv_find_adaptor_by_port (xv_port, adaptors, adaptor_info); -- cgit v1.2.3 From 556e616af4d6b97a40e5b4a1d0dbf56a956b6a3c Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 15 Dec 2011 23:29:50 +0200 Subject: xvmc: Fixed using uninitialized data and resource leak (from 9456) --HG-- branch : point-release --- src/video_out/video_out_xvmc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c index 16d87c6b0..f06f0cf3f 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -226,6 +226,8 @@ typedef struct { Display *display; config_values_t *config; XvPortID xv_port; + XvAdaptorInfo *adaptor_info; + unsigned int adaptor_num; int surface_type_id; unsigned int max_surface_width; @@ -1345,8 +1347,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi int nattr; x11_visual_t *visual = (x11_visual_t *) visual_gen; XColor dummy; - XvAdaptorInfo *adaptor_info; - unsigned int adaptor_num; + XvAdaptorInfo *adaptor_info = class->adaptor_info; + unsigned int adaptor_num = class->adaptor_num; /* XvImage *myimage; */ lprintf ("open_plugin\n"); @@ -1611,6 +1613,10 @@ static char* get_description (video_driver_class_t *this_gen) { static void dispose_class (video_driver_class_t *this_gen) { xvmc_class_t *this = (xvmc_class_t *) this_gen; + XLockDisplay(this->display); + XvFreeAdaptorInfo (this->adaptor_info); + XUnlockDisplay(this->display); + free (this); } @@ -1783,6 +1789,8 @@ static void *init_class (xine_t *xine, void *visual_gen) { this->display = display; this->config = xine->config; this->xv_port = xv_port; + this->adaptor_info = adaptor_info; + this->adaptor_num = adaptor_num; this->surface_type_id = surface_type; this->max_surface_width = max_width; this->max_surface_height = max_height; -- cgit v1.2.3 From 80223ca937303c9183e17b5c032bf4791ddbc96a Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Thu, 15 Dec 2011 23:34:51 +0200 Subject: Fixed printf format --HG-- branch : point-release --- src/video_out/video_out_xxmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 6529d5832..f8caec755 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2458,8 +2458,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi if (xv_port != 0) { if (! xxmc_open_port(this, xv_port)) { xprintf(class->xine, XINE_VERBOSITY_NONE, - _("%s: could not open Xv port %d - autodetecting\n"), - LOG_MODULE, xv_port); + _("%s: could not open Xv port %lu - autodetecting\n"), + LOG_MODULE, (unsigned long)xv_port); xv_port = xxmc_autodetect_port(this, adaptors, adaptor_info, &adaptor_num, xv_port, prefer_type); } else adaptor_num = xxmc_find_adaptor_by_port (xv_port, adaptors, adaptor_info); -- cgit v1.2.3 From 752d2e3f572bf5c6fa6088c4e3966a35241d14de Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 00:03:41 +0200 Subject: Added missing const --HG-- branch : point-release --- src/video_out/video_out_xcbxv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index f1ff843dc..78bbc94e6 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1011,7 +1011,7 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, return 0; } -static void xv_store_port_attribute(xv_driver_t *this, char *name) { +static void xv_store_port_attribute(xv_driver_t *this, const char * const name) { xcb_intern_atom_cookie_t atom_cookie; xcb_intern_atom_reply_t *atom_reply; -- cgit v1.2.3 From 38220c5485ca1f3dea10683fe9e9898d744bd162 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 00:18:56 +0200 Subject: Fixed pointer type --HG-- branch : point-release --- src/dxr3/video_out_dxr3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/dxr3/video_out_dxr3.h b/src/dxr3/video_out_dxr3.h index 12cc3b76f..7e24781bf 100644 --- a/src/dxr3/video_out_dxr3.h +++ b/src/dxr3/video_out_dxr3.h @@ -131,7 +131,7 @@ typedef struct dxr3_frame_s { vo_frame_t vo_frame; uint32_t oheight; int aspect, pan_scan; - uint8_t *mem; /* allocated for YV12 or YUY2 buffers */ + void *mem; /* allocated for YV12 or YUY2 buffers */ uint8_t *real_base[3]; /* yuv/yuy2 buffers in mem aligned on 16 */ int swap_fields; /* shifts Y buffer one line to exchange odd/even lines */ } dxr3_frame_t; -- cgit v1.2.3 From ed12923c2a40fa721429ff0271ad159adf74662d Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 00:40:21 +0200 Subject: define _XOPEN_SOURCE before including any system headers --HG-- branch : point-release --- src/libdts/xine_dts_decoder.c | 8 ++++---- src/libxineadec/xine_lpcm_decoder.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/libdts/xine_dts_decoder.c b/src/libdts/xine_dts_decoder.c index dbf8de718..a3c2eebf0 100644 --- a/src/libdts/xine_dts_decoder.c +++ b/src/libdts/xine_dts_decoder.c @@ -21,10 +21,6 @@ * 09-12-2001 DTS passthrough inprovements (C) James Courtier-Dutton */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifndef __sun /* required for swab() */ #define _XOPEN_SOURCE 500 @@ -32,6 +28,10 @@ /* avoid compiler warnings */ #define _BSD_SOURCE 1 +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/src/libxineadec/xine_lpcm_decoder.c b/src/libxineadec/xine_lpcm_decoder.c index 71ac3f802..100fcee9a 100644 --- a/src/libxineadec/xine_lpcm_decoder.c +++ b/src/libxineadec/xine_lpcm_decoder.c @@ -21,16 +21,16 @@ * (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifndef __sun #define _XOPEN_SOURCE 500 #endif /* avoid compiler warnings */ #define _BSD_SOURCE 1 +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include -- cgit v1.2.3 From 728a4c3a60468715bfa73423d248d2397584615c Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 00:45:03 +0200 Subject: Fixed using uninitialized data --HG-- branch : point-release --- src/libsputext/xine_sputext_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libsputext/xine_sputext_decoder.c b/src/libsputext/xine_sputext_decoder.c index cda8a5983..3090c640e 100644 --- a/src/libsputext/xine_sputext_decoder.c +++ b/src/libsputext/xine_sputext_decoder.c @@ -551,7 +551,7 @@ static int is_cjk_encoding(const char *enc) { static void draw_subtitle(sputext_decoder_t *this, int64_t sub_start, int64_t sub_end ) { int y; - int sub_x, sub_y, max_width; + int sub_x, sub_y, max_width = this->width; int alignment; _x_assert(this->renderer != NULL); -- cgit v1.2.3 From e6491929982ee688487bee2b8ace43e3ae9ffb3f Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 09:56:23 +0200 Subject: Fixed osd_hide() return value --HG-- branch : point-release --- src/xine-engine/osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 32e5e36fd..1d22ea303 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -374,7 +374,7 @@ static int osd_hide (osd_object_t *osd, int64_t vpts) { this->stream->xine->port_ticket->release(this->stream->xine->port_ticket, 1); - return 1; + return ret; } -- cgit v1.2.3 From 6b454a7621efa197b3f922c1ea840b359ac573b2 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 11:15:58 +0200 Subject: Removed write-only variables --HG-- branch : point-release --- src/video_out/video_out_syncfb.c | 3 --- src/xine-engine/load_plugins.c | 5 ----- 2 files changed, 8 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 4cb11dc93..68a04c33d 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -874,14 +874,11 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi syncfb_class_t *class = (syncfb_class_t *) class_gen; config_values_t *config = class->config; syncfb_driver_t* this; - Display* display = NULL; unsigned int i; x11_visual_t* visual = (x11_visual_t *) visual_gen; XColor dummy; XWindowAttributes attr; - display = visual->display; - if(!(this = calloc(1, sizeof (syncfb_driver_t)))) return NULL; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 0080bc30c..06ff719e0 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1662,7 +1662,6 @@ xine_video_port_t *xine_new_framegrab_video_port (xine_t *this) { plugin_node_t *node; vo_driver_t *driver; xine_video_port_t *port; - vo_info_t *vo_info; plugin_catalog_t *catalog = this->plugin_catalog; char *id; int list_id, list_size; @@ -1677,7 +1676,6 @@ xine_video_port_t *xine_new_framegrab_video_port (xine_t *this) { node = xine_sarray_get (catalog->plugin_lists[PLUGIN_VIDEO_OUT - 1], list_id); - vo_info = (vo_info_t *)node->info->special_info; if (!strcasecmp (node->info->id, id)) { driver = _load_video_driver (this, node, NULL); break; @@ -1772,7 +1770,6 @@ ao_driver_t *_x_load_audio_output_plugin (xine_t *this, const char *id) { plugin_node_t *node; ao_driver_t *driver = NULL; - ao_info_t *ao_info; plugin_catalog_t *catalog = this->plugin_catalog; int list_id, list_size; @@ -1783,8 +1780,6 @@ ao_driver_t *_x_load_audio_output_plugin (xine_t *this, const char *id) node = xine_sarray_get (this->plugin_catalog->plugin_lists[PLUGIN_AUDIO_OUT - 1], list_id); - ao_info = (ao_info_t *)node->info->special_info; - if (!strcasecmp(node->info->id, id)) { driver = _load_audio_driver (this, node, NULL); break; -- cgit v1.2.3