decoder/dsf: remove unnecessary ID3 offset check
If the offset is out of range, the seek will simply fail. Not a problem.
This commit is contained in:
parent
672f678ed6
commit
1a53f07d80
@ -171,11 +171,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
|
|||||||
metadata->channels = (unsigned) dsf_fmt_chunk.channelnum;
|
metadata->channels = (unsigned) dsf_fmt_chunk.channelnum;
|
||||||
metadata->sample_rate = samplefreq;
|
metadata->sample_rate = samplefreq;
|
||||||
#ifdef HAVE_ID3TAG
|
#ifdef HAVE_ID3TAG
|
||||||
/* metada_offset cannot be bigger then or equal to total file size */
|
metadata->id3_offset = (InputStream::offset_type)metadata_offset;
|
||||||
if (metadata_offset >= size)
|
|
||||||
metadata->id3_offset = 0;
|
|
||||||
else
|
|
||||||
metadata->id3_offset = (InputStream::offset_type)metadata_offset;
|
|
||||||
#endif
|
#endif
|
||||||
/* check bits per sample format, determine if bitreverse is needed */
|
/* check bits per sample format, determine if bitreverse is needed */
|
||||||
metadata->bitreverse = dsf_fmt_chunk.bitssample == 1;
|
metadata->bitreverse = dsf_fmt_chunk.bitssample == 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user