]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavformat/file.c
Attempt to open files with O_DIRECT
[frescor/ffmpeg.git] / libavformat / file.c
index da0ce150947bfb9b1671b740fbb581b3613dfdb3..402a58e79aaf485aa1a962f109e89aa36dcf754c 100644 (file)
@@ -18,7 +18,7 @@
  * License along with FFmpeg; if not, write to the Free Software
  * 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>
@@ -43,7 +43,7 @@ static int file_open(URLContext *h, const char *filename, int flags)
     if (flags & URL_RDWR) {
         access = O_CREAT | O_TRUNC | O_RDWR;
     } else if (flags & URL_WRONLY) {
-        access = O_CREAT | O_TRUNC | O_WRONLY;
+        access = O_CREAT | O_TRUNC | O_WRONLY | O_DIRECT;
     } else {
         access = O_RDONLY;
     }