shithub: sox

Download patch

ref: 51587fa5692207010c37168438acb69ab1755159
parent: df1c24a047ec75dcd05ea73ac6d76666bd22f75a
author: cbagwell <cbagwell>
date: Tue Mar 21 21:59:56 EST 2006

Also add binary support for windows output.

--- a/Changelog
+++ b/Changelog
@@ -21,7 +21,7 @@
   o Stop SoX from crashing on sphere files that contain large text
     strings.  (1430025) Ulf Hamhammar
   o Fix some overflow crashes in aiff handler. (1430024)  Ulf Hamhammar.
-  o Under windows, set piped input to binary mode (1417794). Marty
+  o Under windows, set piped input/output to binary mode (1417794). Marty
   o Fixed broken internal version of strdup().  (1417790) Marty
   o Stop infinite loop when reading MP3's with a tag size of
     exactly 8192 bytes.  (1417511) Hans Fugal
--- a/src/stio.c
+++ b/src/stio.c
@@ -246,8 +246,8 @@
          */
         if (!strcmp(ft->filename, "-"))
         {
+            SET_BINARY_MODE(stdout);
             ft->fp = stdout;
-
         }
         else if ((ft->fp = fopen(ft->filename, "wb")) == NULL)
         {