aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-14 12:21:23 +0100
committerMax Kellermann <max@duempel.org>2013-12-14 12:40:43 +0100
commitcb336ff666a8fb2958cfb35c36ffcf613b02cd70 (patch)
tree41b2468979a5b5ed163832a88754e9f5bb85ffba /src/decoder
parente2e5433beb02eec1ddafbcdd33ce82ceeee83e0a (diff)
downloadmpd-cb336ff666a8fb2958cfb35c36ffcf613b02cd70.tar.gz
mpd-cb336ff666a8fb2958cfb35c36ffcf613b02cd70.tar.xz
mpd-cb336ff666a8fb2958cfb35c36ffcf613b02cd70.zip
DecoderAPI: add function decoder_skip()
Move code from the "mad" plugin.
Diffstat (limited to '')
-rw-r--r--src/decoder/MadDecoderPlugin.cxx15
1 files changed, 1 insertions, 14 deletions
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
}