[xiph-cvs] cvs commit: speex/src speexdec.c speexenc.c

Jean-Marc Valin jm at xiph.org
Thu Oct 31 12:25:10 PST 2002



jm          02/10/31 15:25:09

  Modified:    src      speexdec.c speexenc.c
  Log:
  Win32 bug fixes by Janne Hyvärinen (Case)

Revision  Changes    Path
1.54      +10 -3     speex/src/speexdec.c

Index: speexdec.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexdec.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- speexdec.c	27 Oct 2002 07:08:21 -0000	1.53
+++ speexdec.c	31 Oct 2002 20:25:09 -0000	1.54
@@ -93,7 +93,7 @@
 
 FILE *out_file_open(char *outFile, int rate)
 {
-   FILE *fout;
+   FILE *fout=NULL;
    /*Open output file*/
    if (strlen(outFile)==0)
    {
@@ -382,7 +382,7 @@
    if (strcmp(inFile, "-")==0)
    {
 #if defined WIN32 || defined _WIN32
-      _setmode(_fileno(stdout), _O_BINARY);
+      _setmode(_fileno(stdin), _O_BINARY);
 #endif
       fin=stdin;
    }
@@ -528,8 +528,15 @@
    ogg_sync_clear(&oy);
    ogg_stream_clear(&os);
 
+#if defined WIN32 || defined _WIN32
+   if (strlen(outFile)==0)
+      WIN_Audio_close ();
+#endif
+
    if (close_in)
       fclose(fin);
-   fclose(fout);
+   if (fout != NULL)
+      fclose(fout);   
+
    return 1;
 }

<p><p>1.51      +1 -1      speex/src/speexenc.c

Index: speexenc.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexenc.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- speexenc.c	27 Oct 2002 07:08:21 -0000	1.50
+++ speexenc.c	31 Oct 2002 20:25:09 -0000	1.51
@@ -334,7 +334,7 @@
    if (strcmp(inFile, "-")==0)
    {
 #if defined WIN32 || defined _WIN32
-         _setmode(_fileno(stdout), _O_BINARY);
+         _setmode(_fileno(stdin), _O_BINARY);
 #endif
       fin=stdin;
    }

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list