diff options
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r-- | stream/stream_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index aa946c5c14..d9f5cd92e7 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -94,7 +94,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { if(mode == STREAM_READ) m = O_RDONLY; else if(mode == STREAM_WRITE) - m = O_RDWR|O_CREAT; + m = O_RDWR|O_CREAT|O_TRUNC; else { mp_msg(MSGT_OPEN,MSGL_ERR, "[file] Unknown open mode %d\n",mode); m_struct_free(&stream_opts,opts); |