decoder/sidplay: Fix song length initialisation during container scan

The song length was previously undetermined.
This commit is contained in:
Fredrik Noring 2019-08-04 20:17:03 +02:00 committed by Max Kellermann
parent ab830f9afd
commit 0ed10542cc
2 changed files with 6 additions and 0 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.21.14 (not yet released)
* decoder
- sidplay: show track durations in database
ver 0.21.13 (2019/08/06)
* input

View File

@ -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 */