]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavformat/file.c
avio patch by (Gildas Bazin <gbazin at altern dot org>)
[frescor/ffmpeg.git] / libavformat / file.c
index ee1f72a00c334abd963bb48a1ff4af5b594b5fe4..b1d61caf8932412bcaabdbd943d7ffc59642de22 100644 (file)
@@ -37,7 +37,9 @@ static int file_open(URLContext *h, const char *filename, int flags)
 
     strstart(filename, "file:", &filename);
 
-    if (flags & URL_WRONLY) {
+    if (flags & URL_RDWR) {
+        access = O_CREAT | O_TRUNC | O_RDWR;
+    } else if (flags & URL_WRONLY) {
         access = O_CREAT | O_TRUNC | O_WRONLY;
     } else {
         access = O_RDONLY;