summaryrefslogtreecommitdiffstats
path: root/stream/stream_vcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_vcd.c')
-rw-r--r--stream/stream_vcd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c
index 4c6dbcc074..0bc7e14f53 100644
--- a/stream/stream_vcd.c
+++ b/stream/stream_vcd.c
@@ -56,6 +56,8 @@
#define vcd_close(priv) (close(((mp_vcd_priv_t*)priv)->fd))
#endif
+#include "osdep/io.h"
+
static int fill_buffer(stream_t *s, char* buffer, int max_len){
if(s->pos > s->end_pos) /// don't past end of current track
return 0;
@@ -112,7 +114,7 @@ static int open_s(stream_t *stream,int mode)
OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
f = _open_osfhandle((intptr_t)hd, _O_RDONLY);
#else
- f=open(dev,O_RDONLY);
+ f=open(dev,O_RDONLY | O_CLOEXEC);
#endif
if(f<0){
mp_tmsg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",dev);