diff options
Diffstat (limited to 'src/video_out')
| -rw-r--r-- | src/video_out/video_out_syncfb.c | 3 | ||||
| -rw-r--r-- | src/video_out/video_out_xcbxv.c | 2 | ||||
| -rw-r--r-- | src/video_out/video_out_xv.c | 4 | ||||
| -rw-r--r-- | src/video_out/video_out_xvmc.c | 12 | ||||
| -rw-r--r-- | src/video_out/video_out_xxmc.c | 4 |
5 files changed, 15 insertions, 10 deletions
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/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; 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); 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; 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); |
