From 406bda9b952e74f5ba028e66ca40b72af1e7bf17 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Dec 2014 21:52:31 +0100 Subject: decoder/sidplay: simplify the SidDatabase::length() call --- src/decoder/plugins/SidplayDecoderPlugin.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3