From 411581182475289ad1ec80dac8d41d71c2eefb38 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 26 Jul 2016 06:57:29 +0000 Subject: optimization in the DecoderMADFactory::canDecode function git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6600 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mad/decodermadfactory.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index b4e957b0e..a14eb17ea 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -84,6 +84,9 @@ bool DecoderMADFactory::canDecode(QIODevice *input) const if (input->peek(buf,sizeof(buf)) == sizeof(buf)) { + if (!memcmp(buf + 8, "WAVE", 4) && !memcmp(buf + 20, "U" ,1)) + return true; + struct mad_stream stream; struct mad_header header; int dec_res; -- cgit v1.2.3-13-gbd6f