From cb336ff666a8fb2958cfb35c36ffcf613b02cd70 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Dec 2013 12:21:23 +0100 Subject: DecoderAPI: add function decoder_skip() Move code from the "mad" plugin. --- src/decoder/MadDecoderPlugin.cxx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/decoder') diff --git a/src/decoder/MadDecoderPlugin.cxx b/src/decoder/MadDecoderPlugin.cxx index 0359840fc..c98d65f87 100644 --- a/src/decoder/MadDecoderPlugin.cxx +++ b/src/decoder/MadDecoderPlugin.cxx @@ -413,20 +413,7 @@ MadDecoder::ParseId3(size_t tagsize, Tag **mpd_tag) mad_stream_skip(&stream, tagsize); } else { mad_stream_skip(&stream, count); - - while (count < tagsize) { - size_t len = tagsize - count; - char ignored[1024]; - if (len > sizeof(ignored)) - len = sizeof(ignored); - - len = decoder_read(decoder, input_stream, - ignored, len); - if (len == 0) - break; - else - count += len; - } + decoder_skip(decoder, input_stream, tagsize - count); } #endif } -- cgit v1.2.3