diff options
Diffstat (limited to 'libavformat/file.c')
-rw-r--r-- | libavformat/file.c | 4 |
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; |