aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mpeg/decoder_mad.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-09 21:19:35 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2021-02-09 21:19:35 +0000
commit7e7141599cd04c0d721cbc4cbad5c50ab8e7dc73 (patch)
tree2c3da62d3e5e5047cdad1e177d7a93b9b74c7d12 /src/plugins/Input/mpeg/decoder_mad.cpp
parent3f7a4110979a94f326a77ea20d3817f9623fd2f5 (diff)
downloadqmmp-7e7141599cd04c0d721cbc4cbad5c50ab8e7dc73.tar.gz
qmmp-7e7141599cd04c0d721cbc4cbad5c50ab8e7dc73.tar.bz2
qmmp-7e7141599cd04c0d721cbc4cbad5c50ab8e7dc73.zip
mpeg: added option to enable CRC checking
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9719 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mpeg/decoder_mad.cpp')
-rw-r--r--src/plugins/Input/mpeg/decoder_mad.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/Input/mpeg/decoder_mad.cpp b/src/plugins/Input/mpeg/decoder_mad.cpp
index 073871c70..03eff03ce 100644
--- a/src/plugins/Input/mpeg/decoder_mad.cpp
+++ b/src/plugins/Input/mpeg/decoder_mad.cpp
@@ -33,7 +33,7 @@
#define LAME_MAGIC (('L' << 24) | ('A' << 16) | ('M' << 8) | 'E')
#define INPUT_BUFFER_SIZE (32*1024)
-DecoderMAD::DecoderMAD(QIODevice *i) : Decoder(i)
+DecoderMAD::DecoderMAD(bool crc, QIODevice *i) : Decoder(i), m_crc(crc)
{}
DecoderMAD::~DecoderMAD()
@@ -74,7 +74,8 @@ bool DecoderMAD::initialize()
}
mad_stream_init(&m_stream);
- mad_stream_options(&m_stream, MAD_OPTION_IGNORECRC);
+ if(!m_crc)
+ mad_stream_options(&m_stream, MAD_OPTION_IGNORECRC);
mad_frame_init(&m_frame);
mad_synth_init(&m_synth);