aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2009-01-11 22:05:43 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2009-01-11 22:05:43 +0000
commitb507ebd1792da5e44088ddcab315b41cc500695b (patch)
tree820172589e4d3560fffc4a7405a25d644e1f4d9e /libavformat
parent5b6c2cbdc8bc2cf17f08bd23e564ea1a8ae96f56 (diff)
downloadffmpeg-b507ebd1792da5e44088ddcab315b41cc500695b.tar.gz
Use setmode() if it exists in <io.h>, and not based on O_BINARY.
Originally committed as revision 16553 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index e50168d89e..827541d1ae 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -22,6 +22,9 @@
#include "libavutil/avstring.h"
#include "avformat.h"
#include <fcntl.h>
+#ifdef HAVE_SETMODE
+#include <io.h>
+#endif
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
@@ -104,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
fd = 0;
}
}
-#ifdef O_BINARY
+#ifdef HAVE_SETMODE
setmode(fd, O_BINARY);
#endif
h->priv_data = (void *)(size_t)fd;