aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/MadDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-14 12:21:23 +0100
committerMax Kellermann <max@duempel.org>2014-07-09 19:03:31 +0200
commitbf7417981f2527348fb261f40f4de15f9b350db5 (patch)
treefc9f5ef2ade165e14189b7218b82637b123080bb /src/decoder/MadDecoderPlugin.cxx
parentdba41e2e4afd9cf342a6274cd8103dc45b5b883e (diff)
downloadmpd-bf7417981f2527348fb261f40f4de15f9b350db5.tar.gz
mpd-bf7417981f2527348fb261f40f4de15f9b350db5.tar.xz
mpd-bf7417981f2527348fb261f40f4de15f9b350db5.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 9dd86c55f..7afc8ef8f 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
}