summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvd_common.c')
-rw-r--r--stream/stream_dvd_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_dvd_common.c b/stream/stream_dvd_common.c
index 3416eea094..b079f97d06 100644
--- a/stream/stream_dvd_common.c
+++ b/stream/stream_dvd_common.c
@@ -39,6 +39,8 @@
#include <sys/ioctl.h>
#endif
+#include "osdep/io.h"
+
#include "mpvcore/mp_msg.h"
#include "stream_dvd_common.h"
@@ -104,7 +106,7 @@ void dvd_set_speed(char *device, unsigned speed)
AV_WB16(buffer + 18, 1000);
AV_WB16(buffer + 26, 1000);
- fd = open(device, O_RDWR | O_NONBLOCK);
+ fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd == -1) {
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;