summaryrefslogtreecommitdiff
path: root/src/input/input_dvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_dvd.c')
-rw-r--r--src/input/input_dvd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index a845d7628..4f8827dbd 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -53,7 +53,9 @@
#include <dlfcn.h>
#ifndef WIN32
+#if ! defined(__GNU__)
#include <sys/mount.h>
+#endif
#include <sys/wait.h>
#include <sys/poll.h>
@@ -115,6 +117,9 @@
/* There really isn't a default on Windows! */
#define DVD_PATH "d:\\"
#define RDVD_PATH "d:\\"
+#elif defined(__OpenBSD__)
+#define DVD_PATH "/dev/rcd0c"
+#define RDVD_PATH "/dev/rcd0c"
#else
#define DVD_PATH "/dev/dvd"
#define RDVD_PATH "/dev/rdvd"
@@ -850,6 +855,9 @@ static buf_element_t *dvd_plugin_read_block (input_plugin_t *this_gen,
static off_t dvd_plugin_read (input_plugin_t *this_gen, char *ch_buf, off_t len) {
/* dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen; */
+ if (len < 4)
+ return -1;
+
/* FIXME: Tricking the demux_mpeg_block plugin */
ch_buf[0] = 0;
ch_buf[1] = 0;