summaryrefslogtreecommitdiff
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>2016-07-29 14:55:58 +0200
commit33f33323affdf15315d7c71d57e265c5dd05c193 (patch)
treeaa92ae735c230f12718c7dbb7b010078d69b2c78 /src/decoder/plugins/SidplayDecoderPlugin.cxx
parent388fae2c47d208a4da043aa6b73e31a5a05984ed (diff)
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();