Author: sayer
Date: 2008-05-15 16:24:31 +0200 (Thu, 15 May 2008)
New Revision: 956

Modified:
   trunk/core/AmAudioFile.cpp
Log:
fixed bug that would prevent writing header when re-using AmAudioFile

Modified: trunk/core/AmAudioFile.cpp
===================================================================
--- trunk/core/AmAudioFile.cpp  2008-05-14 20:26:39 UTC (rev 955)
+++ trunk/core/AmAudioFile.cpp  2008-05-15 14:24:31 UTC (rev 956)
@@ -112,6 +112,7 @@
   close();
 
   this->close_on_exit = true;
+  on_close_done = false;
 
   FILE* n_fp = NULL;
 
@@ -138,6 +139,7 @@
 int AmAudioFile::fpopen(const string& filename, OpenMode mode, FILE* n_fp)
 {
   close();
+  on_close_done = false;
   return fpopen_int(filename, mode, n_fp);
 }
 
@@ -245,7 +247,7 @@
        ERROR("file format pointer not initialized: on_close will not be 
called\n");
       }
       else if(iofmt->on_close)
-       (*iofmt->on_close)(fp,&fmt_desc,open_mode, fmt->getHCodecNoInit(), 
fmt->getCodec());
+       (*iofmt->on_close)(fp,&fmt_desc,open_mode, fmt->getHCodecNoInit(), 
fmt->getCodec());      
     }
 
     if(open_mode == AmAudioFile::Write){

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to