shithub: sox

Download patch

ref: 6526c600672ef016d718cbc4f34e482f060dafa4
parent: a44503f44e9973c539df5646d258a466e6fb2a9d
author: Ulrich Klauer <ulrich@chirlu.de>
date: Tue Nov 8 21:12:54 EST 2011

Read more of the file for automatic format detection

For automatic format detection, read the first 4096 bytes of the input file
(instead of 256). This allows libmagic to detect MP3; see
https://bugzilla.redhat.com/show_bug.cgi?id=751066

Resolves #3434839.

--- a/src/formats.c
+++ b/src/formats.c
@@ -37,7 +37,7 @@
   #include <magic.h>
 #endif
 
-#define AUTO_DETECT_SIZE 256
+#define AUTO_DETECT_SIZE 4096
 
 static char const * auto_detect_format(sox_format_t * ft, char const * ext)
 {