1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

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
This commit is contained in:
lorenm 2007-03-05 17:42:25 +00:00
parent dd866c4d11
commit 58846451f0
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -104,7 +104,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) //who's gonna do that ?
m = O_RDWR|O_CREAT;
m = O_RDWR|O_CREAT|O_TRUNC;
else {
mp_msg(MSGT_OPEN, MSGL_ERR, "[smb] Unknown open mode %d\n", mode);
m_struct_free (&stream_opts, opts);