[MPlayer-cvslog] r22469 - in trunk/stream: stream_file.c stream_smb.c

lorenm subversion at mplayerhq.hu
Mon Mar 5 18:42:25 CET 2007


Author: lorenm
Date: Mon Mar  5 18:42:25 2007
New Revision: 22469

Modified:
   trunk/stream/stream_file.c
   trunk/stream/stream_smb.c

Log:
truncate mencoder's output file if it exists, instead of overwriting just part of it.


Modified: trunk/stream/stream_file.c
==============================================================================
--- trunk/stream/stream_file.c	(original)
+++ trunk/stream/stream_file.c	Mon Mar  5 18:42:25 2007
@@ -94,7 +94,7 @@ static int open_f(stream_t *stream,int m
   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);

Modified: trunk/stream/stream_smb.c
==============================================================================
--- trunk/stream/stream_smb.c	(original)
+++ trunk/stream/stream_smb.c	Mon Mar  5 18:42:25 2007
@@ -104,7 +104,7 @@ static int open_f (stream_t *stream, int
   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);



More information about the MPlayer-cvslog mailing list