diff options
Diffstat (limited to 'src/input/vcd')
-rw-r--r-- | src/input/vcd/Makefile.am | 1 | ||||
-rw-r--r-- | src/input/vcd/libcdio/FreeBSD/freebsd.c | 2 | ||||
-rw-r--r-- | src/input/vcd/libcdio/MSWindows/aspi32.c | 4 | ||||
-rw-r--r-- | src/input/vcd/xine-extra.c | 10 | ||||
-rw-r--r-- | src/input/vcd/xineplug_inp_vcd.c | 16 |
5 files changed, 18 insertions, 15 deletions
diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 31ec6a44c..61eac753b 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -1,3 +1,4 @@ +include $(top_builddir)/misc/Makefile.plugins include $(top_srcdir)/misc/Makefile.common SUBDIRS = libcdio libvcd diff --git a/src/input/vcd/libcdio/FreeBSD/freebsd.c b/src/input/vcd/libcdio/FreeBSD/freebsd.c index 5a3443e95..bcfe674a5 100644 --- a/src/input/vcd/libcdio/FreeBSD/freebsd.c +++ b/src/input/vcd/libcdio/FreeBSD/freebsd.c @@ -29,11 +29,11 @@ static const char _rcsid[] = "$Id: freebsd.c,v 1.1 2005/01/01 02:43:57 rockyb Exp $"; -#include <arpa/inet.h> #include "freebsd.h" #ifdef HAVE_FREEBSD_CDROM +#include <arpa/inet.h> #include <cdio/sector.h> static access_mode_t diff --git a/src/input/vcd/libcdio/MSWindows/aspi32.c b/src/input/vcd/libcdio/MSWindows/aspi32.c index 238a4b4e9..e62f8a089 100644 --- a/src/input/vcd/libcdio/MSWindows/aspi32.c +++ b/src/input/vcd/libcdio/MSWindows/aspi32.c @@ -162,9 +162,9 @@ have_aspi( HMODULE *hASPI, return false; } - (FARPROC) *lpGetSupport = GetProcAddress( *hASPI, + *lpGetSupport = (FARPROC)GetProcAddress( *hASPI, "GetASPI32SupportInfo" ); - (FARPROC) *lpSendCommand = GetProcAddress( *hASPI, + *lpSendCommand = (FARPROC)GetProcAddress( *hASPI, "SendASPI32Command" ); /* make sure that we've got both function addresses */ diff --git a/src/input/vcd/xine-extra.c b/src/input/vcd/xine-extra.c index 79c962a79..e3b6da912 100644 --- a/src/input/vcd/xine-extra.c +++ b/src/input/vcd/xine-extra.c @@ -45,8 +45,10 @@ static xine_t *my_xine = NULL; void xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args) { + va_list copy; + va_copy (copy, args); xine_vlog(this, buf, format, args); - vfprintf(stdout, format, args); + vfprintf(stdout, format, copy); } /*! This routine is like xine_log, except it takes a va_list instead @@ -59,8 +61,10 @@ xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args) void xine_vlog_err(xine_t *this, int buf, const char *format, va_list args) { + va_list copy; + va_copy (copy, args); xine_vlog(this, buf, format, args); - vfprintf(stderr, format, args); + vfprintf(stderr, format, copy); } /*! Call this before calling any of the xine_log_msg or xine_log_err @@ -116,8 +120,8 @@ xine_log_err(const char *format, ...) { va_list args; - va_start(args, format); if (NULL == my_xine) return false; + va_start(args, format); xine_vlog_err(my_xine, XINE_LOG_MSG, format, args); va_end(args); return true; diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 2e52ccc0f..50382ee7e 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -20,7 +20,7 @@ /* These are plugin routines called by the xine engine. See Chapter 4. Extending xine's input - http://xinehq.de/index.php/hackersguide/index.php?resource=5.3&action=default#INPUT + http://www.xine-project.org/hackersguide#INPUT and the comments in input_plugin.h This is what is referred to below a "the xine plugin spec" @@ -272,11 +272,9 @@ vcd_add_mrl_slot(vcd_input_class_t *this, const char *mrl, off_t size, this->mrls[*i]->type = mrl_vcd; this->mrls[*i]->size = size * M2F2_SECTOR_SIZE; - this->mrls[*i]->mrl = (char *) malloc(strlen(mrl) + 1); + this->mrls[*i]->mrl = strdup(mrl); if (NULL==this->mrls[*i]->mrl) { LOG_ERR("Can't malloc %zu bytes for MRL name %s", sizeof(xine_mrl_t), mrl); - } else { - sprintf(this->mrls[*i]->mrl, "%s", mrl); } (*i)++; } @@ -968,7 +966,7 @@ vcd_class_eject_media (input_class_t *this_gen) * From spec: * return current MRL */ -static char * +static const char * vcd_plugin_get_mrl (input_plugin_t *this_gen) { vcd_input_plugin_t *t = (vcd_input_plugin_t *) this_gen; @@ -989,7 +987,7 @@ vcd_plugin_get_mrl (input_plugin_t *this_gen) /* Bad type. */ LOG_ERR("%s %d", _("Invalid current entry type"), vcdplayer->play_item.type); - return strdup(""); + return ""; } else { n += offset; if (n < t->class->num_mrls) { @@ -997,7 +995,7 @@ vcd_plugin_get_mrl (input_plugin_t *this_gen) t->class->mrls[n]->mrl); return t->class->mrls[n]->mrl; } else { - return strdup(""); + return ""; } } } @@ -1007,7 +1005,7 @@ vcd_plugin_get_mrl (input_plugin_t *this_gen) return human readable (verbose = 1 line) description for this plugin */ -static char * +static const char * vcd_class_get_description (input_class_t *this_gen) { dbg_print((INPUT_DBG_CALL|INPUT_DBG_EXT), "called\n"); @@ -1767,7 +1765,7 @@ vcd_init (xine_t *xine, void *data) dbg_print(INPUT_DBG_CALL, "Called\n"); - class = (vcd_input_class_t *) xine_xmalloc (sizeof (vcd_input_class_t)); + class = calloc(1, sizeof (vcd_input_class_t)); class->xine = xine; class->config = config = xine->config; |