added -C (--cgi) parameter.
[swftools.git] / avi2swf / avi2swf.cc
index 71e2f7d..c63df79 100644 (file)
@@ -4,8 +4,20 @@
    Part of the swftools package.
    
    Copyright (c) 2001,2002,2003 Matthias Kramm <kramm@quiss.org>
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-   This file is distributed under the GPL, see file COPYING for details */
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -316,10 +328,12 @@ bool videoreader_avifile_eof(videoreader_t* v)
 void videoreader_avifile_close(videoreader_t* v)
 {
     videoreader_avifile_internal*i = (videoreader_avifile_internal*)v->internal;
-    ringbuffer_clear(&i->audio_buffer);
     if(verbose) {
        printf("videoreader_close()\n");fflush(stdout);
     }
+    if(i->do_audio) {
+       ringbuffer_clear(&i->audio_buffer);
+    }
 }
 void* videoreader_avifile_getinfo(videoreader_t* v, char* name)
 {