[MPlayer-cvslog] r30850 - in trunk/stream: stream.h stream_cddb.c stream_file.c stream_live555.c

komh subversion at mplayerhq.hu
Sat Mar 6 08:24:41 CET 2010


Author: komh
Date: Sat Mar  6 08:24:41 2010
New Revision: 30850

Log:
Define O_BINARY in stream/stream.h unless it is defined yet, and use it
in other places.

This removes platform specific checks and prevents repeated definitions
of O_BINARY.

Modified:
   trunk/stream/stream.h
   trunk/stream/stream_cddb.c
   trunk/stream/stream_file.c
   trunk/stream/stream_live555.c

Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h	Sat Mar  6 00:13:08 2010	(r30849)
+++ trunk/stream/stream.h	Sat Mar  6 08:24:41 2010	(r30850)
@@ -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

Modified: trunk/stream/stream_cddb.c
==============================================================================
--- trunk/stream/stream_cddb.c	Sat Mar  6 00:13:08 2010	(r30849)
+++ trunk/stream/stream_cddb.c	Sat Mar  6 08:24:41 2010	(r30850)
@@ -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/"
 

Modified: trunk/stream/stream_file.c
==============================================================================
--- trunk/stream/stream_file.c	Sat Mar  6 00:13:08 2010	(r30849)
+++ trunk/stream/stream_file.c	Sat Mar  6 08:24:41 2010	(r30850)
@@ -136,9 +136,7 @@ static int open_f(stream_t *stream,int m
     filename++;
 #endif
 
-#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
   m |= O_BINARY;
-#endif
 
   if(!strcmp(filename,"-")){
     if(mode == STREAM_READ) {

Modified: trunk/stream/stream_live555.c
==============================================================================
--- trunk/stream/stream_live555.c	Sat Mar  6 00:13:08 2010	(r30849)
+++ trunk/stream/stream_live555.c	Sat Mar  6 08:24:41 2010	(r30850)
@@ -79,11 +79,7 @@ static int open_live_sdp(stream_t *strea
 
   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_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
       return STREAM_ERROR;


More information about the MPlayer-cvslog mailing list