summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:18:42 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:18:42 +0200
commit0269d22d32fb380e7128ca0c60f6f1638c6dab70 (patch)
tree53ba64153d9ef930f73458138478a6d0def381ce /stream
parent240550bbb94653907faa6e0bb1c5ac3d279cc252 (diff)
parent97ef28ad9aa2f34aea0779062976ad4294c0af51 (diff)
downloadmpv-0269d22d32fb380e7128ca0c60f6f1638c6dab70.tar.bz2
mpv-0269d22d32fb380e7128ca0c60f6f1638c6dab70.tar.xz
Merge svn changes up to r30876
Diffstat (limited to 'stream')
-rw-r--r--stream/stream.h5
-rw-r--r--stream/stream_cddb.c4
-rw-r--r--stream/stream_file.c2
-rw-r--r--stream/stream_live555.c4
4 files changed, 5 insertions, 10 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 7d6619f75b..523da2ce00 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -25,6 +25,11 @@
#include <string.h>
#include <inttypes.h>
#include <sys/types.h>
+#include <fcntl.h>
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
#define STREAMTYPE_DUMMY -1 // for placeholders, when the actual reading is handled in the demuxer
#define STREAMTYPE_FILE 0 // read from seekable file
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index 811a1c1570..e6caa21a4c 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -76,10 +76,6 @@
#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/"
diff --git a/stream/stream_file.c b/stream/stream_file.c
index a77d51d315..b78a851432 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -136,9 +136,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
filename++;
#endif
-#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
m |= O_BINARY;
-#endif
if(!strcmp(filename,"-")){
if(mode == STREAM_READ) {
diff --git a/stream/stream_live555.c b/stream/stream_live555.c
index acf616acd4..cb198ef60c 100644
--- a/stream/stream_live555.c
+++ b/stream/stream_live555.c
@@ -79,11 +79,7 @@ static int open_live_sdp(stream_t *stream,int mode, void* opts, int* file_format
if(strncmp("sdp://",filename,6) == 0) {
filename += 6;
-#if defined(__CYGWIN__) || defined(__MINGW32__)
f = open(filename,O_RDONLY|O_BINARY);
-#else
- f = open(filename,O_RDONLY);
-#endif
if(f < 0) {
mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename);
return STREAM_ERROR;