From 7e7141599cd04c0d721cbc4cbad5c50ab8e7dc73 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 9 Feb 2021 21:19:35 +0000 Subject: 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 --- src/plugins/Input/mpeg/decoder_mad.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/Input/mpeg/decoder_mad.cpp') 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); -- cgit v1.2.3-13-gbd6f