shithub: sox

Download patch

ref: e115840157493a614dc5b18349f7571fb967f95e
parent: a35d4e0f49f287e5296f65a9a9c00b6b8a71e7a9
author: robs <robs>
date: Thu Feb 5 16:45:36 EST 2009

allow length check

--- a/src/cdr.c
+++ b/src/cdr.c
@@ -20,7 +20,7 @@
 
 static int start(sox_format_t * ft)
 {
-  return lsx_check_read_params(ft, 2, 44100., SOX_ENCODING_SIGN2, 16, (off_t)0, sox_false);
+  return lsx_check_read_params(ft, 2, 44100., SOX_ENCODING_SIGN2, 16, (off_t)0, sox_true);
 }
 
 static int stopwrite(sox_format_t * ft)
--- a/src/sf.c
+++ b/src/sf.c
@@ -112,7 +112,7 @@
   if (lsx_skipbytes(ft, FIXED_HDR - (size_t)lsx_tell(ft)))
     return SOX_EOF;
 
-  return lsx_check_read_params(ft, channels, rate, encoding, bits_per_sample, (off_t)0, sox_false);
+  return lsx_check_read_params(ft, channels, rate, encoding, bits_per_sample, (off_t)0, sox_true);
 }
 
 static int write_header(sox_format_t * ft)
--- a/src/sounder.c
+++ b/src/sounder.c
@@ -28,7 +28,7 @@
     lsx_fail_errno(ft, SOX_EHDR, "invalid Sounder header");
     return SOX_EOF;
   }
-  return lsx_check_read_params(ft, 1, (sox_rate_t)rate, SOX_ENCODING_UNSIGNED, 8, (off_t)0, sox_false);
+  return lsx_check_read_params(ft, 1, (sox_rate_t)rate, SOX_ENCODING_UNSIGNED, 8, (off_t)0, sox_true);
 }
 
 static int write_header(sox_format_t * ft)