#include "libavutil/avstring.h"
#include "avformat.h"
#include <fcntl.h>
+#if HAVE_SETMODE
+#include <io.h>
+#endif
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
}
/* XXX: use llseek */
-static offset_t file_seek(URLContext *h, offset_t pos, int whence)
+static int64_t file_seek(URLContext *h, int64_t pos, int whence)
{
int fd = (size_t)h->priv_data;
return lseek(fd, pos, whence);
static int pipe_open(URLContext *h, const char *filename, int flags)
{
int fd;
- const char * final;
+ char *final;
av_strstart(filename, "pipe:", &filename);
fd = strtol(filename, &final, 10);
fd = 0;
}
}
-#ifdef O_BINARY
+#if HAVE_SETMODE
setmode(fd, O_BINARY);
#endif
h->priv_data = (void *)(size_t)fd;