From 1a53f07d8084453d66f9c0b7bd940a1790ef7c10 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Aug 2014 20:23:36 +0200 Subject: decoder/dsf: remove unnecessary ID3 offset check If the offset is out of range, the seek will simply fail. Not a problem. --- src/decoder/plugins/DsfDecoderPlugin.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/decoder/plugins/DsfDecoderPlugin.cxx') diff --git a/src/decoder/plugins/DsfDecoderPlugin.cxx b/src/decoder/plugins/DsfDecoderPlugin.cxx index 94c25247d..a48a8f321 100644 --- a/src/decoder/plugins/DsfDecoderPlugin.cxx +++ b/src/decoder/plugins/DsfDecoderPlugin.cxx @@ -171,11 +171,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is, metadata->channels = (unsigned) dsf_fmt_chunk.channelnum; metadata->sample_rate = samplefreq; #ifdef HAVE_ID3TAG - /* metada_offset cannot be bigger then or equal to total file size */ - if (metadata_offset >= size) - metadata->id3_offset = 0; - else - metadata->id3_offset = (InputStream::offset_type)metadata_offset; + metadata->id3_offset = (InputStream::offset_type)metadata_offset; #endif /* check bits per sample format, determine if bitreverse is needed */ metadata->bitreverse = dsf_fmt_chunk.bitssample == 1; -- cgit v1.2.3