shithub: sox

Download patch

ref: c58705f3fb68ede18ec726e3852c3a0cc2057337
parent: 100706dd3b9ddc73fc46fc3da414d50a17a11f83
author: cbagwell <cbagwell>
date: Wed Sep 8 22:46:52 EDT 2004

workaround for handlers that report 0 instead of EOF.

--- a/src/sox.c
+++ b/src/sox.c
@@ -674,12 +674,20 @@
          */
         if (efftab[0].olen == ST_EOF)
         {
+            efftab[0].olen = 0;
+        }
+
+        /* Some file handlers claim 0 bytes instead of returning
+         * ST_EOF.  In either case, attempt to go to the next
+         * input file.
+         */
+        if (efftab[0].olen == 0)
+        {
             if (current_input < input_count-1)
             {
                 current_input++;
                 continue;
             }
-            efftab[0].olen = 0;
         }
 
         /* Adjust input side volume based on value specified