summaryrefslogtreecommitdiff
path: root/libavformat/file.c
diff options
context:
space:
mode:
authorGildas Bazin <gbazi@altern.org>2004-02-14 16:25:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-14 16:25:32 +0000
commitac9fe33d0ee55372b75fbae93d2954cff9974bf0 (patch)
treeb62cef6c29c15c31310b091d74248a7cc333f8d6 /libavformat/file.c
parentd4c3c5a6f6658732b2b6e569cd243df4ec409f87 (diff)
avio patch by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 2783 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/file.c')
-rw-r--r--libavformat/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index ee1f72a00c..b1d61caf89 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -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;