diff options
author | Fredrik Noring <noring@nocrew.org> | 2019-08-04 20:17:03 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-08-09 15:39:36 +0200 |
commit | 0ed10542cc0ef7c590e3b8b9717ae26309dd494a (patch) | |
tree | fa471a9a514a9d0e667fb407711065bce54681a3 /src | |
parent | ab830f9afd09969e566db934980322adc6d333a0 (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.cxx | 4 |
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 */ |