summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFredrik Noring <noring@nocrew.org>2019-08-04 20:17:03 +0200
committerMax Kellermann <max@musicpd.org>2019-08-09 15:39:36 +0200
commit0ed10542cc0ef7c590e3b8b9717ae26309dd494a (patch)
treefa471a9a514a9d0e667fb407711065bce54681a3 /src
parentab830f9afd09969e566db934980322adc6d333a0 (diff)
decoder/sidplay: Fix song length initialisation during container scan
The song length was previously undetermined.
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/SidplayDecoderPlugin.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx
index 90d762dae..d38010872 100644
--- a/src/decoder/plugins/SidplayDecoderPlugin.cxx
+++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx
@@ -547,6 +547,10 @@ sidplay_container_scan(Path path_fs)
AddTagHandler h(tag_builder);
ScanSidTuneInfo(info, i, n_tracks, h);
+ const SignedSongTime duration = get_song_length(tune);
+ if (!duration.IsNegative())
+ h.OnDuration(SongTime(duration));
+
char track_name[32];
/* Construct container/tune path names, eg.
Delta.sid/tune_001.sid */