summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:25:15 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:25:15 +0200
commitacdce0176ae3722ad38a23aae0cf0bf03a82f9c4 (patch)
tree57a30f1d44ea193586d5723faac7ffb96a3a73aa /stream
parentef3ef5e218588b5f68b427729a3c2c1a8083e499 (diff)
parent5a2289137f43501281dba83fe98b5f67be63f9ef (diff)
downloadmpv-acdce0176ae3722ad38a23aae0cf0bf03a82f9c4.tar.bz2
mpv-acdce0176ae3722ad38a23aae0cf0bf03a82f9c4.tar.xz
Merge svn changes up to r30732
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cddb.c10
-rw-r--r--stream/vcd_read.h4
-rw-r--r--stream/vcd_read_darwin.h4
-rw-r--r--stream/vcd_read_fbsd.h4
-rw-r--r--stream/vcd_read_win32.h4
5 files changed, 13 insertions, 13 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index 8bbe9d33b2..c83acfb633 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -74,6 +74,10 @@
#include "network.h"
#include "libavutil/common.h"
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#define DEFAULT_FREEDB_SERVER "freedb.freedb.org"
#define DEFAULT_CACHE_DIR "/.cddb/"
@@ -346,11 +350,7 @@ int cddb_read_cache(cddb_data_t *cddb_data)
sprintf(file_name, "%s%08lx", cddb_data->cache_dir, cddb_data->disc_id);
- file_fd = open(file_name, O_RDONLY
-#if defined(__MINGW32__) || defined(__CYGWIN__)
- | O_BINARY
-#endif
- );
+ file_fd = open(file_name, O_RDONLY | O_BINARY);
if (file_fd < 0) {
mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No cache found.\n");
return -1;
diff --git a/stream/vcd_read.h b/stream/vcd_read.h
index ae34d1cf21..f94c7ea297 100644
--- a/stream/vcd_read.h
+++ b/stream/vcd_read.h
@@ -72,7 +72,7 @@ int vcd_seek_to_track(mp_vcd_priv_t* vcd,int track){
return VCD_SECTOR_DATA*vcd_get_msf(vcd);
}
-int vcd_get_track_end(mp_vcd_priv_t* vcd,int track){
+static int vcd_get_track_end(mp_vcd_priv_t* vcd,int track){
vcd->entry.cdte_format = CDROM_MSF;
vcd->entry.cdte_track = track<vcd->tochdr.cdth_trk1?(track+1):CDROM_LEADOUT;
if (ioctl(vcd->fd, CDROMREADTOCENTRY, &vcd->entry)) {
@@ -82,7 +82,7 @@ int vcd_get_track_end(mp_vcd_priv_t* vcd,int track){
return VCD_SECTOR_DATA*vcd_get_msf(vcd);
}
-mp_vcd_priv_t* vcd_read_toc(int fd){
+static mp_vcd_priv_t* vcd_read_toc(int fd){
struct cdrom_tochdr tochdr;
mp_vcd_priv_t* vcd;
int i, min = 0, sec = 0, frame = 0;
diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h
index 4d4a0334ba..20f1782049 100644
--- a/stream/vcd_read_darwin.h
+++ b/stream/vcd_read_darwin.h
@@ -86,7 +86,7 @@ int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
return VCD_SECTOR_DATA*vcd_get_msf(vcd);
}
-int vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
+static int vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
{
struct CDTrackInfo entry;
@@ -117,7 +117,7 @@ int vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
return VCD_SECTOR_DATA*vcd_get_msf(vcd);
}
-mp_vcd_priv_t* vcd_read_toc(int fd)
+static mp_vcd_priv_t* vcd_read_toc(int fd)
{
dk_cd_read_disc_info_t tochdr;
struct CDDiscInfo hdr;
diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h
index e29eedc13f..d6fa56dc6d 100644
--- a/stream/vcd_read_fbsd.h
+++ b/stream/vcd_read_fbsd.h
@@ -144,7 +144,7 @@ vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
return VCD_SECTOR_DATA * vcd_get_msf(vcd);
}
-int
+static int
vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
{
if (!read_toc_entry(vcd,
@@ -153,7 +153,7 @@ vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
return VCD_SECTOR_DATA * vcd_get_msf(vcd);
}
-mp_vcd_priv_t*
+static mp_vcd_priv_t*
vcd_read_toc(int fd)
{
struct ioc_toc_header tochdr;
diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h
index f0b7bd45ef..3b93a76b0a 100644
--- a/stream/vcd_read_win32.h
+++ b/stream/vcd_read_win32.h
@@ -63,14 +63,14 @@ int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
return VCD_SECTOR_DATA * (sect + 2);
}
-int vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
+static int vcd_get_track_end(mp_vcd_priv_t* vcd, int track)
{
if (track < vcd->toc.FirstTrack || track > vcd->toc.LastTrack)
return -1;
return VCD_SECTOR_DATA * (vcd_get_msf(vcd, track + 1));
}
-mp_vcd_priv_t* vcd_read_toc(int fd)
+static mp_vcd_priv_t* vcd_read_toc(int fd)
{
DWORD dwBytesReturned;
HANDLE hd;