summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-12-16 11:45:23 +0200
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-12-16 11:45:23 +0200
commita541a6e710239d3a2d00a1f07e8afa8e50f05594 (patch)
tree1015e6a3d4a2f94adf47023e3a64ca8b1d2d22c2
parent479c80505dca5c15a1ea17129d426d95d1aa04ee (diff)
parent6b454a7621efa197b3f922c1ea840b359ac573b2 (diff)
downloadxine-lib-a541a6e710239d3a2d00a1f07e8afa8e50f05594.tar.gz
xine-lib-a541a6e710239d3a2d00a1f07e8afa8e50f05594.tar.bz2
Merge
-rw-r--r--src/dxr3/video_out_dxr3.h2
-rw-r--r--src/libdts/xine_dts_decoder.c8
-rw-r--r--src/libsputext/xine_sputext_decoder.c2
-rw-r--r--src/libxineadec/xine_lpcm_decoder.c8
-rw-r--r--src/video_out/video_out_syncfb.c3
-rw-r--r--src/video_out/video_out_xcbxv.c2
-rw-r--r--src/video_out/video_out_xv.c4
-rw-r--r--src/video_out/video_out_xvmc.c12
-rw-r--r--src/video_out/video_out_xxmc.c4
-rw-r--r--src/xine-engine/load_plugins.c5
-rw-r--r--src/xine-engine/osd.c2
11 files changed, 26 insertions, 26 deletions
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;
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 <stdlib.h>
#include <unistd.h>
#include <string.h>
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);
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 <stdlib.h>
#include <unistd.h>
#include <string.h>
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);
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;
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;
}