aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/SidplayDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-04 21:52:31 +0100
committerMax Kellermann <max@duempel.org>2014-12-04 21:53:45 +0100
commit406bda9b952e74f5ba028e66ca40b72af1e7bf17 (patch)
treed2bdd44c68f00e3b120809cc431cf2c82950e8a0 /src/decoder/plugins/SidplayDecoderPlugin.cxx
parent405f1dd02715b142f582eb1eab41b7055da36f99 (diff)
downloadmpd-406bda9b952e74f5ba028e66ca40b72af1e7bf17.tar.gz
mpd-406bda9b952e74f5ba028e66ca40b72af1e7bf17.tar.xz
mpd-406bda9b952e74f5ba028e66ca40b72af1e7bf17.zip
decoder/sidplay: simplify the SidDatabase::length() call
Diffstat (limited to 'src/decoder/plugins/SidplayDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/SidplayDecoderPlugin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx
index 9bbff7ae1..7bd355086 100644
--- a/src/decoder/plugins/SidplayDecoderPlugin.cxx
+++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx
@@ -141,12 +141,10 @@ get_song_length(const SidplayContainerPath &container)
"failed to load file for calculating md5 sum");
return SignedSongTime::Negative();
}
- char md5sum[SIDTUNE_MD5_LENGTH+1];
- tune.createMD5(md5sum);
- const unsigned song_num = container.track;
+ tune.selectSong(container.track);
- const auto length = songlength_database->length(md5sum, song_num);
+ const auto length = songlength_database->length(tune);
if (length < 0)
return SignedSongTime::Negative();