summaryrefslogtreecommitdiffstats
path: root/stream/stream_vcd.c
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-21 16:54:58 -0300
committerwm4 <wm4@nowhere>2013-07-22 02:52:04 +0200
commitdb9102765afe9f8904ff299632dc09a5035a3eb8 (patch)
tree891f75c69058ef09453be5db2a09c1a2940680ac /stream/stream_vcd.c
parent58338f9240f459953fa647124dbffe75e0a79622 (diff)
downloadmpv-db9102765afe9f8904ff299632dc09a5035a3eb8.tar.bz2
mpv-db9102765afe9f8904ff299632dc09a5035a3eb8.tar.xz
stream_vcd.c: fix compilation on win32
The mp_vcd_priv_t struct doesn't have a file descriptor but a file handle on win32.
Diffstat (limited to 'stream/stream_vcd.c')
-rw-r--r--stream/stream_vcd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c
index 0fd2998c58..229d78bfc2 100644
--- a/stream/stream_vcd.c
+++ b/stream/stream_vcd.c
@@ -53,6 +53,10 @@
#include "vcd_read.h"
#endif
+#ifndef vcd_close
+#define vcd_close(priv) (close(((mp_vcd_priv_t*)priv)->fd))
+#endif
+
extern char *cdrom_device;
static struct stream_priv_s {
@@ -95,9 +99,8 @@ static int seek(stream_t *s,int64_t newpos) {
}
static void close_s(stream_t *stream) {
- mp_vcd_priv_t *p = stream->priv;
- close(p->fd);
- free(p);
+ vcd_close(stream->priv);
+ free(stream->priv);
}
static int open_s(stream_t *stream,int mode, void* opts)