diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_dec/xine_dts_decoder.c | 8 | ||||
-rw-r--r-- | src/audio_dec/xine_lpcm_decoder.c | 8 | ||||
-rw-r--r-- | src/combined/flac_decoder.c | 20 | ||||
-rw-r--r-- | src/combined/flac_demuxer.c | 8 | ||||
-rw-r--r-- | src/dxr3/video_out_dxr3.h | 2 | ||||
-rw-r--r-- | src/spu_dec/sputext_decoder.c | 2 | ||||
-rw-r--r-- | src/video_out/video_out_xcbxv.c | 2 | ||||
-rw-r--r-- | src/video_out/video_out_xvmc.c | 12 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 5 | ||||
-rw-r--r-- | src/xine-engine/osd.c | 2 |
10 files changed, 42 insertions, 27 deletions
diff --git a/src/audio_dec/xine_dts_decoder.c b/src/audio_dec/xine_dts_decoder.c index ffacf4a94..9711650a4 100644 --- a/src/audio_dec/xine_dts_decoder.c +++ b/src/audio_dec/xine_dts_decoder.c @@ -26,10 +26,6 @@ * @author James Courtier-Dutton (2001-12-09) */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifndef __sun /* required for swab() */ #define _XOPEN_SOURCE 500 @@ -37,6 +33,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/audio_dec/xine_lpcm_decoder.c b/src/audio_dec/xine_lpcm_decoder.c index 59f847f5c..db4a79fff 100644 --- a/src/audio_dec/xine_lpcm_decoder.c +++ b/src/audio_dec/xine_lpcm_decoder.c @@ -25,16 +25,16 @@ * @date 2001-08-31 Added LPCM rate sensing */ -#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/combined/flac_decoder.c b/src/combined/flac_decoder.c index 1572fd2be..2d4176f9a 100644 --- a/src/combined/flac_decoder.c +++ b/src/combined/flac_decoder.c @@ -62,9 +62,9 @@ typedef struct flac_decoder_s { FLAC__StreamDecoder *flac_decoder; unsigned char *buf; - int buf_size; - int buf_pos; - int min_size; + size_t buf_size; + size_t buf_pos; + size_t min_size; int output_open; @@ -74,23 +74,31 @@ typedef struct flac_decoder_s { * FLAC callback functions */ +#ifdef LEGACY_FLAC static FLAC__StreamDecoderReadStatus flac_read_callback (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data) +#else +static FLAC__StreamDecoderReadStatus +flac_read_callback (const FLAC__StreamDecoder *decoder, + FLAC__byte buffer[], + size_t *bytes, + void *client_data) +#endif { flac_decoder_t *this = (flac_decoder_t *)client_data; - int number_of_bytes_to_copy; + size_t number_of_bytes_to_copy; - lprintf("flac_read_callback: %d\n", *bytes); + lprintf("flac_read_callback: %zd\n", (size_t)*bytes); if (this->buf_pos > *bytes) number_of_bytes_to_copy = *bytes; else number_of_bytes_to_copy = this->buf_pos; - lprintf("number_of_bytes_to_copy: %d\n", number_of_bytes_to_copy); + lprintf("number_of_bytes_to_copy: %zd\n", number_of_bytes_to_copy); *bytes = number_of_bytes_to_copy; diff --git a/src/combined/flac_demuxer.c b/src/combined/flac_demuxer.c index 0685631c7..7b4ed3c95 100644 --- a/src/combined/flac_demuxer.c +++ b/src/combined/flac_demuxer.c @@ -101,13 +101,17 @@ typedef struct demux_flac_class_s { static #ifdef LEGACY_FLAC FLAC__SeekableStreamDecoderReadStatus +flac_read_callback (const FLAC__SeekableStreamDecoder *decoder, + FLAC__byte buffer[], + unsigned *bytes, + void *client_data) #else FLAC__StreamDecoderReadStatus -#endif flac_read_callback (const FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], - unsigned *bytes, + size_t *bytes, void *client_data) +#endif { demux_flac_t *this = (demux_flac_t *)client_data; input_plugin_t *input = this->input; diff --git a/src/dxr3/video_out_dxr3.h b/src/dxr3/video_out_dxr3.h index 6faabc00f..8158bba8e 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/spu_dec/sputext_decoder.c b/src/spu_dec/sputext_decoder.c index 749b23208..ae16cde37 100644 --- a/src/spu_dec/sputext_decoder.c +++ b/src/spu_dec/sputext_decoder.c @@ -552,7 +552,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/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index b10aa8e78..a07864e8e 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -860,7 +860,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_xvmc.c b/src/video_out/video_out_xvmc.c index 14961074c..f3321e929 100644 --- a/src/video_out/video_out_xvmc.c +++ b/src/video_out/video_out_xvmc.c @@ -218,6 +218,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; @@ -1309,8 +1311,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"); @@ -1521,6 +1523,10 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi 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); } @@ -1693,6 +1699,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/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 7623008dd..bbe5f0910 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1808,7 +1808,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; const char *id; int list_id, list_size; @@ -1823,7 +1822,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; @@ -1918,7 +1916,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; @@ -1929,8 +1926,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 c827607b1..423d72eb6 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -554,7 +554,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; } |