mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 02:51:26 +00:00
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.
This commit is contained in:
parent
58338f9240
commit
db9102765a
@ -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)
|
||||
|
@ -132,6 +132,8 @@ static mp_vcd_priv_t* vcd_read_toc(int fd)
|
||||
return vcd;
|
||||
}
|
||||
|
||||
#define vcd_close(priv) (CloseHandle(((mp_vcd_priv_t*)priv)->hd))
|
||||
|
||||
static int vcd_read(mp_vcd_priv_t* vcd, char *mem)
|
||||
{
|
||||
DWORD dwBytesReturned;
|
||||
|
Loading…
Reference in New Issue
Block a user