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/video_out') 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/video_out') 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/video_out') 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/video_out') 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 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 --- 1 file changed, 3 deletions(-) (limited to 'src/video_out') 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; -- cgit v1.2.3 From 9ac49d0a98459e3d2710928e165a3cfca63c2d4b Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Fri, 16 Dec 2011 11:58:59 +0200 Subject: Hide aliasing problems in xcb plugins --HG-- branch : point-release --- src/video_out/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_out') diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 84712db66..4923bea57 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -114,11 +114,11 @@ xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ xineplug_vo_out_xcbshm_la_SOURCES = video_out_xcbshm.c $(XCBOSD) xineplug_vo_out_xcbshm_la_LIBADD = $(YUV_LIBS) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS) $(LTLIBINTL) -xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) +xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xcbxv_la_SOURCES = deinterlace.c video_out_xcbxv.c $(XCBOSD) xineplug_vo_out_xcbxv_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) $(XCBXV_LIBS) $(XCB_LIBS) -xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAGS) +xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xshm_la_SOURCES = video_out_xshm.c $(X11OSD) xineplug_vo_out_xshm_la_LIBADD = $(YUV_LIBS) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -- cgit v1.2.3