From 16f75a570ee5efdd0ad7f3edf54eeedcacca3131 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 12 Mar 2014 15:00:09 +0200 Subject: [PATCH] Support reading sox style piped wav files Sox writes the RIFF header size as a very large number, instead of as 0 as in libavformat. --- wavreader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wavreader.c b/wavreader.c index 76443e0..182b3eb 100644 --- a/wavreader.c +++ b/wavreader.c @@ -89,7 +89,7 @@ void* wav_read_open(const char *filename) { if (feof(wr->wav)) break; length = read_int32(wr); - if (!length) { + if (!length || length >= 0x7fff0000) { wr->streamed = 1; length = ~0; }