summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-25 16:37:27 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-25 16:37:27 +0100
commit51ee5df118326a3d2374f2432fff63dd3edceaf6 (patch)
tree6000b579c7ee6a062e3e642a48c74d68a23bf3d3 /src/input
parent9d5da6a3aae928d7fd702d03ea8212f2db48dd5b (diff)
parent070ab73cf3ac064f23895cb19b2e67717f42077d (diff)
downloadxine-lib-51ee5df118326a3d2374f2432fff63dd3edceaf6.tar.gz
xine-lib-51ee5df118326a3d2374f2432fff63dd3edceaf6.tar.bz2
Merge from 1.1; resync translation files.
--HG-- rename : po/libxine1.pot => po/libxine2.pot rename : src/libmad/xine_mad_decoder.c => src/audio_dec/xine_mad_decoder.c rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_vcd.c17
-rw-r--r--src/input/libdvdnav/dvd_input.c1
-rw-r--r--src/input/pnm.c1
3 files changed, 11 insertions, 8 deletions
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 8f780de29..c1d2d0ece 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
#include <string.h>
#include <netinet/in.h>
#ifdef HAVE_LINUX_CDROM_H
@@ -92,7 +93,7 @@ typedef struct {
#if defined (__linux__) || defined(__sun)
struct cdrom_tochdr tochdr;
struct cdrom_tocentry tocent[100];
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
struct ioc_toc_header tochdr;
struct cd_toc_entry *tocent;
off_t cur_sec;
@@ -117,7 +118,7 @@ typedef struct {
int cur_track;
-#if defined (__linux__) || defined(__sun) || defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#if defined (__linux__) || defined(__sun) || (defined(BSD) && BSD >= 199306)
uint8_t cur_min, cur_sec, cur_frame;
#endif
@@ -177,7 +178,7 @@ static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
return 0;
}
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
struct ioc_read_toc_entry te;
@@ -394,7 +395,7 @@ static off_t vcd_plugin_read (input_plugin_t *this_gen,
memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */
return VCDSECTORSIZE;
}
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
void *buf_gen, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -534,7 +535,7 @@ static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */
return buf;
}
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
fifo_buffer_t *fifo, off_t nlen) {
@@ -693,7 +694,7 @@ static off_t vcd_plugin_seek (input_plugin_t *this_gen,
return offset ; /* FIXME */
}
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
static off_t vcd_plugin_seek (input_plugin_t *this_gen,
off_t offset, int origin) {
@@ -767,7 +768,7 @@ static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
return (off_t) 0;
}
-#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
+#elif (defined(BSD) && BSD >= 199306)
static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
off_t len ;
@@ -862,7 +863,7 @@ static int vcd_plugin_open (input_plugin_t *this_gen) {
this->cur_min = this->cls->tocent[this->cur_track].cdte_addr.msf.minute;
this->cur_sec = this->cls->tocent[this->cur_track].cdte_addr.msf.second;
this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame;
-#elif defined (__OpenBSD__)
+#elif defined (__OpenBSD__) || defined(__NetBSD__)
this->cur_min = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.minute;
this->cur_sec = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.second;
this->cur_frame = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.frame;
diff --git a/src/input/libdvdnav/dvd_input.c b/src/input/libdvdnav/dvd_input.c
index 7b35f5eef..8eea51412 100644
--- a/src/input/libdvdnav/dvd_input.c
+++ b/src/input/libdvdnav/dvd_input.c
@@ -319,6 +319,7 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags)
return (int) (bytes / DVD_VIDEO_LB_LEN);
}
+ buffer += ret;
len -= ret;
}
diff --git a/src/input/pnm.c b/src/input/pnm.c
index f44b7dcaa..d07d35c7e 100644
--- a/src/input/pnm.c
+++ b/src/input/pnm.c
@@ -714,6 +714,7 @@ pnm_t *pnm_connect(xine_stream_t *stream, const char *mrl) {
if (strncmp(mrl,"pnm://",6))
{
+ free (mrl_ptr);
return NULL;
}