]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavformat/file.c
I forgot commit this
[frescor/ffmpeg.git] / libavformat / file.c
index da0ce150947bfb9b1671b740fbb581b3613dfdb3..37de6111b201b9369a21bf7cd527c3c415bc559c 100644 (file)
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _GNU_SOURCE
 #include "libavutil/avstring.h"
 #include "avformat.h"
 #include <fcntl.h>
@@ -50,6 +51,8 @@ static int file_open(URLContext *h, const char *filename, int flags)
 #ifdef O_BINARY
     access |= O_BINARY;
 #endif
+    if (flags & URL_DIRECT)
+       access |= O_DIRECT;
     fd = open(filename, access, 0666);
     if (fd < 0)
         return AVERROR(ENOENT);