diff options
author | Max Kellermann <max@duempel.org> | 2013-12-14 12:21:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-09 19:03:31 +0200 |
commit | bf7417981f2527348fb261f40f4de15f9b350db5 (patch) | |
tree | fc9f5ef2ade165e14189b7218b82637b123080bb /src/decoder | |
parent | dba41e2e4afd9cf342a6274cd8103dc45b5b883e (diff) | |
download | mpd-bf7417981f2527348fb261f40f4de15f9b350db5.tar.gz mpd-bf7417981f2527348fb261f40f4de15f9b350db5.tar.xz mpd-bf7417981f2527348fb261f40f4de15f9b350db5.zip |
DecoderAPI: add function decoder_skip()
Move code from the "mad" plugin.
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/MadDecoderPlugin.cxx | 15 |
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 } |