diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/asfheader.c | 24 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 7 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_pes.c | 7 | ||||
-rw-r--r-- | src/libxinevdec/image.c | 13 | ||||
-rw-r--r-- | src/xine-engine/alphablend.h | 8 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 15 | ||||
-rw-r--r-- | src/xine-engine/events.c | 3 | ||||
-rw-r--r-- | src/xine-engine/info_helper.c | 5 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 26 | ||||
-rw-r--r-- | src/xine-engine/scratch.c | 3 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 5 | ||||
-rw-r--r-- | src/xine-utils/memcpy.c | 4 | ||||
-rw-r--r-- | src/xine-utils/xine_check.c | 3 | ||||
-rw-r--r-- | src/xine-utils/xineutils.h | 4 |
14 files changed, 70 insertions, 57 deletions
diff --git a/src/demuxers/asfheader.c b/src/demuxers/asfheader.c index 4416687f5..0e46a2b33 100644 --- a/src/demuxers/asfheader.c +++ b/src/demuxers/asfheader.c @@ -80,6 +80,7 @@ static void asf_reader_init(asf_reader_t *reader, uint8_t *buffer, int size) { reader->size = size;
}
+#if 0
static int asf_reader_get_8(asf_reader_t *reader, uint8_t *value) {
if ((reader->size - reader->pos) < 1)
return 0;
@@ -87,6 +88,7 @@ static int asf_reader_get_8(asf_reader_t *reader, uint8_t *value) { reader->pos += 1;
return 1;
}
+#endif
static int asf_reader_get_16(asf_reader_t *reader, uint16_t *value) {
if ((reader->size - reader->pos) < 2)
@@ -206,7 +208,7 @@ int asf_find_object_id (GUID *g) { }
/* Manage id mapping */
-int asf_header_get_stream_id(asf_header_t *header_pub, uint16_t stream_number) {
+static int asf_header_get_stream_id(asf_header_t *header_pub, uint16_t stream_number) {
asf_header_internal_t *header = (asf_header_internal_t *)header_pub;
int i;
@@ -227,7 +229,7 @@ int asf_header_get_stream_id(asf_header_t *header_pub, uint16_t stream_number) { return header->number_count - 1;
}
-int asf_header_parse_file_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_file_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
asf_reader_t reader;
asf_file_t *asf_file;
uint32_t flags;
@@ -281,7 +283,7 @@ int asf_header_parse_file_properties(asf_header_t *header, uint8_t *buffer, int return 1;
}
-int asf_header_parse_stream_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_stream_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
asf_reader_t reader;
uint16_t flags;
uint32_t junk;
@@ -348,7 +350,7 @@ exit_error: return 0;
}
-int asf_header_parse_stream_extended_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_stream_extended_properties(asf_header_t *header, uint8_t *buffer, int buffer_len) {
asf_reader_t reader;
uint32_t flags;
uint16_t stream_number;
@@ -467,7 +469,7 @@ int asf_header_parse_stream_extended_properties(asf_header_t *header, uint8_t *b return 1;
}
-int asf_header_parse_stream_bitrate_properties(asf_header_t *header_pub, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_stream_bitrate_properties(asf_header_t *header_pub, uint8_t *buffer, int buffer_len) {
asf_header_internal_t *header = (asf_header_internal_t *)header_pub;
asf_reader_t reader;
uint16_t bitrate_count;
@@ -507,7 +509,7 @@ int asf_header_parse_stream_bitrate_properties(asf_header_t *header_pub, uint8_t return 1;
}
-int asf_header_parse_header_extension(asf_header_t *header, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_header_extension(asf_header_t *header, uint8_t *buffer, int buffer_len) {
asf_reader_t reader;
GUID junk1;
@@ -568,7 +570,7 @@ int asf_header_parse_header_extension(asf_header_t *header, uint8_t *buffer, int return 1;
}
-int asf_header_parse_content_description(asf_header_t *header_pub, uint8_t *buffer, int buffer_len) {
+static int asf_header_parse_content_description(asf_header_t *header_pub, uint8_t *buffer, int buffer_len) {
asf_header_internal_t *header = (asf_header_internal_t *)header_pub;
asf_reader_t reader;
asf_content_t *content;
@@ -707,11 +709,11 @@ exit_error: }
-void asf_header_delete_file_properties(asf_file_t *asf_file) {
+static void asf_header_delete_file_properties(asf_file_t *asf_file) {
free(asf_file);
}
-void asf_header_delete_content(asf_content_t *asf_content) {
+static void asf_header_delete_content(asf_content_t *asf_content) {
if (asf_content->title)
free(asf_content->title);
if (asf_content->author)
@@ -725,7 +727,7 @@ void asf_header_delete_content(asf_content_t *asf_content) { free(asf_content);
}
-void asf_header_delete_stream_properties(asf_stream_t *asf_stream) {
+static void asf_header_delete_stream_properties(asf_stream_t *asf_stream) {
if (asf_stream->private_data)
free(asf_stream->private_data);
if (asf_stream->error_correction_data)
@@ -733,7 +735,7 @@ void asf_header_delete_stream_properties(asf_stream_t *asf_stream) { free(asf_stream);
}
-void asf_header_delete_stream_extended_properties(asf_stream_extension_t *asf_stream_extension) {
+static void asf_header_delete_stream_extended_properties(asf_stream_extension_t *asf_stream_extension) {
int i;
if (asf_stream_extension->stream_name_count > 0) {
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 76c46525e..ef17ac948 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2006 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_block.c,v 1.216 2006/07/10 22:08:13 dgp85 Exp $ + * $Id: demux_mpeg_block.c,v 1.217 2006/10/16 22:18:24 valtri Exp $ * * demultiplexer for mpeg 1/2 program streams * used with fixed blocksize devices (like dvd/vcd) @@ -72,7 +72,8 @@ typedef struct demux_mpeg_block_s { char cur_mrl[256]; - uint8_t *scratch, *scratch_base; + uint8_t *scratch; + void *scratch_base; int64_t nav_last_end_pts; int64_t nav_last_start_pts; diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c index a49a3cc6b..cb9732e53 100644 --- a/src/demuxers/demux_mpeg_pes.c +++ b/src/demuxers/demux_mpeg_pes.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2006 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_pes.c,v 1.36 2006/07/10 22:08:13 dgp85 Exp $ + * $Id: demux_mpeg_pes.c,v 1.37 2006/10/16 22:18:24 valtri Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -75,7 +75,8 @@ typedef struct demux_mpeg_pes_s { char cur_mrl[256]; - uint8_t *scratch, *scratch_base; + uint8_t *scratch; + void *scratch_base; int64_t nav_last_end_pts; int64_t nav_last_start_pts; diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c index bdd29f28a..045e98000 100644 --- a/src/libxinevdec/image.c +++ b/src/libxinevdec/image.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: image.c,v 1.20 2006/07/10 22:08:43 dgp85 Exp $ + * $Id: image.c,v 1.21 2006/10/16 22:18:24 valtri Exp $ * * a image video decoder */ @@ -37,14 +37,21 @@ #define LOG */ +#include <wand/magick_wand.h> +#ifdef PACKAGE_NAME +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#endif + #include "xine_internal.h" #include "video_out.h" #include "buffer.h" #include "xineutils.h" #include "bswap.h" -#include <wand/magick_wand.h> - typedef struct { video_decoder_class_t decoder_class; diff --git a/src/xine-engine/alphablend.h b/src/xine-engine/alphablend.h index 30806cd5e..513ac116f 100644 --- a/src/xine-engine/alphablend.h +++ b/src/xine-engine/alphablend.h @@ -59,10 +59,10 @@ void _x_alphablend_free(alphablend_t *extra_data) XINE_PROTECTED; #endif typedef struct { /* CLUT == Color LookUp Table */ - uint8_t cb : 8; - uint8_t cr : 8; - uint8_t y : 8; - uint8_t foo : 8; + uint8_t cb; + uint8_t cr; + uint8_t y; + uint8_t foo; } ATTRIBUTE_PACKED clut_t; diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 1475a10c2..59ac6f585 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2005 the xine project + * Copyright (C) 2000-2006 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.205 2006/09/26 01:13:18 dgp85 Exp $ + * $Id: audio_out.c,v 1.206 2006/10/16 22:18:24 valtri Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -422,10 +422,14 @@ static void fifo_wait_empty (audio_fifo_t *fifo) { static void write_pause_burst(aos_t *this, uint32_t num_frames) { + uint16_t sbuf[4096]; + + sbuf[0] = 0xf872; + sbuf[1] = 0x4e1f; /* Audio ES Channel empty, wait for DD Decoder or pause */ - static const unsigned short sbuf[4096] = - { 0xf872, 0x4e1f, 0x0003, 0x0020, 0x0, }; - + sbuf[2] = 0x0003; + sbuf[3] = 0x0020; + memset(&sbuf[4], 0, sizeof(sbuf) - 4 * sizeof(uint16_t)); while (num_frames > 1536) { pthread_mutex_lock( &this->driver_lock ); if(this->driver_open) @@ -433,7 +437,6 @@ static void write_pause_burst(aos_t *this, uint32_t num_frames) { pthread_mutex_unlock( &this->driver_lock ); num_frames -= 1536; } - } diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c index 2b16116b3..990cbe787 100644 --- a/src/xine-engine/events.c +++ b/src/xine-engine/events.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: events.c,v 1.31 2006/09/26 22:03:44 dgp85 Exp $ + * $Id: events.c,v 1.32 2006/10/16 22:18:24 valtri Exp $ * * Event handling functions * @@ -143,6 +143,7 @@ void xine_event_dispose_queue (xine_event_queue_t *queue) { ite = xine_list_front (stream->event_queues); + q = NULL; if ( ite ) { do { q = xine_list_get_value (stream->event_queues, ite); diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c index 68b2e4de3..e38b5e5c4 100644 --- a/src/xine-engine/info_helper.c +++ b/src/xine-engine/info_helper.c @@ -20,7 +20,7 @@ * stream metainfo helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: info_helper.c,v 1.18 2006/09/26 21:54:40 dgp85 Exp $ + * $Id: info_helper.c,v 1.19 2006/10/16 22:18:24 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -193,7 +193,8 @@ static int meta_info_validate_utf8 (const char *value) { iconv_t cd; char *utf8_value; - ICONV_CONST char *inbuf, *outbuf; + ICONV_CONST char *inbuf; + char *outbuf; size_t inbytesleft, outbytesleft; if ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)-1) { diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a0e245040..0a6b182f9 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.225 2006/09/26 21:32:08 dgp85 Exp $ + * $Id: load_plugins.c,v 1.226 2006/10/16 22:18:24 valtri Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -181,7 +181,7 @@ static void map_decoder_list (xine_t *this, for (list_id = 0; list_id < list_size; list_id++) { plugin_node_t *node = xine_sarray_get(decoder_list, list_id); - uint32_t *type = ((decoder_info_t *)node->info->special_info)->supported_types; + const uint32_t *type = ((decoder_info_t *)node->info->special_info)->supported_types; int priority = get_decoder_priority(this, node); lprintf ("mapping decoder %s\n", node->info->id); @@ -955,34 +955,34 @@ static void load_plugin_list(FILE *fp, xine_sarray_t *plugins) { switch (node->info->type & PLUGIN_TYPE_MASK){ case PLUGIN_VIDEO_OUT: - vo_info = node->info->special_info = + node->info->special_info = vo_info = xine_xmalloc(sizeof(vo_info_t)); break; case PLUGIN_AUDIO_OUT: - ao_info = node->info->special_info = - xine_xmalloc(sizeof(ao_info_t)); + node->info->special_info = ao_info = + xine_xmalloc(sizeof(ao_info_t)); break; case PLUGIN_DEMUX: - demuxer_info = node->info->special_info = + node->info->special_info = demuxer_info = xine_xmalloc(sizeof(demuxer_info_t)); break; case PLUGIN_INPUT: - input_info = node->info->special_info = + node->info->special_info = input_info = xine_xmalloc(sizeof(input_info_t)); break; case PLUGIN_AUDIO_DECODER: case PLUGIN_VIDEO_DECODER: case PLUGIN_SPU_DECODER: - decoder_info = node->info->special_info = + node->info->special_info = decoder_info = xine_xmalloc(sizeof(decoder_info_t)); break; case PLUGIN_POST: - post_info = node->info->special_info = + node->info->special_info = post_info = xine_xmalloc(sizeof(post_info_t)); break; } @@ -1527,7 +1527,7 @@ vo_driver_t *_x_load_video_output_plugin(xine_t *this, node = xine_sarray_get (catalog->plugin_lists[PLUGIN_VIDEO_OUT - 1], list_id); - vo_info = node->info->special_info; + vo_info = (vo_info_t *)node->info->special_info; if (vo_info->visual_type == visual_type) { if (id) { if (!strcasecmp (node->info->id, id)) { @@ -1591,7 +1591,7 @@ 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 = node->info->special_info; + vo_info = (vo_info_t *)node->info->special_info; if (!strcasecmp (node->info->id, id)) { driver = _load_video_driver (this, node, NULL); break; @@ -1674,7 +1674,7 @@ xine_audio_port_t *xine_open_audio_driver (xine_t *this, const char *id, node = xine_sarray_get (this->plugin_catalog->plugin_lists[PLUGIN_AUDIO_OUT - 1], list_id); - ao_info = node->info->special_info; + ao_info = (ao_info_t *)node->info->special_info; if (id) { if (!strcasecmp(node->info->id, id)) { @@ -2546,7 +2546,7 @@ static void dispose_plugin_list (xine_sarray_t *list) { free (decoder_info->supported_types); default: - free (node->info->special_info); + free ((void *)node->info->special_info); break; } diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index 259aec441..aad2693b9 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.c,v 1.20 2006/09/26 05:19:49 dgp85 Exp $ + * $Id: scratch.c,v 1.21 2006/10/16 22:18:24 valtri Exp $ * * top-level xine functions * @@ -96,7 +96,6 @@ static void scratch_dispose (scratch_buffer_t *this) { scratch_buffer_t *_x_new_scratch_buffer (int num_lines) { scratch_buffer_t *this; int i; - char *mem; this = xine_xmalloc (sizeof (scratch_buffer_t)); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 5e07836d1..78476a768 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.334 2006/09/25 23:11:19 dgp85 Exp $ + * $Id: xine.c,v 1.335 2006/10/16 22:18:24 valtri Exp $ */ /* @@ -644,7 +644,7 @@ static void mrl_unescape(char *mrl) { for (i = 0; i < len; i++) { if ((mrl[i]=='%') && (i<(len-2))) { - int c; + unsigned int c; if (sscanf(&mrl[i + 1], "%02x", &c) == 1) { mrl[i]= (char)c; @@ -1400,7 +1400,6 @@ void xine_exit (xine_t *this) { xine_t *xine_new (void) { xine_t *this; - int i; #ifdef WIN32 WSADATA Data; diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c index 68cc82aa2..15301f108 100644 --- a/src/xine-utils/memcpy.c +++ b/src/xine-utils/memcpy.c @@ -407,9 +407,9 @@ static struct { }; #if (defined(ARCH_X86) || defined(ARCH_X86_64)) && defined(HAVE_SYS_TIMES_H) -static unsigned long long int rdtsc(int config_flags) +static int64_t rdtsc(int config_flags) { - unsigned long long int x; + int64_t x; /* that should prevent us from trying cpuid with old cpus */ if( config_flags & MM_MMX ) { diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 7bbf645ff..43e046a45 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -81,7 +81,6 @@ set_hc_result(xine_health_check_t* hc, int state, const char *format, ...) va_list args; char *buf = NULL; - int n, size; if (!hc) { printf ("xine_check: GASP, hc is NULL\n"); @@ -94,7 +93,7 @@ set_hc_result(xine_health_check_t* hc, int state, const char *format, ...) } va_start(args, format); - asprintf (&buf, format, args); + vasprintf (&buf, format, args); va_end(args); if (!buf) diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index b4e3d1ff8..15f771da0 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.104 2006/09/26 07:48:57 dgp85 Exp $ + * $Id: xineutils.h,v 1.105 2006/10/16 22:18:24 valtri Exp $ * */ #ifndef XINEUTILS_H @@ -868,7 +868,7 @@ void xine_hexdump (const char *buf, int length) XINE_PROTECTED; #define lprintf(fmt, args...) do {} while(0) #else #ifdef _MSC_VER -void __inline lprintf(const char * fmt, ...) {}; +void __inline lprintf(const char * fmt, ...) {} #else #define lprintf(...) do {} while(0) #endif /* _MSC_VER */ |