diff options
author | lorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-05 17:42:25 +0000 |
---|---|---|
committer | lorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-05 17:42:25 +0000 |
commit | 58846451f0e1db00d40d5068250bf9b81a6a5e4e (patch) | |
tree | 57b1a3c706a819f12843fe66da399ab9f3361844 /stream/stream_file.c | |
parent | dd866c4d11dfe1f87b32844bc92792e929fb743e (diff) | |
download | mpv-58846451f0e1db00d40d5068250bf9b81a6a5e4e.tar.bz2 mpv-58846451f0e1db00d40d5068250bf9b81a6a5e4e.tar.xz |
truncate mencoder's output file if it exists, instead of overwriting just part of it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22469 b3059339-0415-0410-9bf9-f77b7e298cf2
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); |