diff options
author | Max Kellermann <max@duempel.org> | 2015-10-26 17:16:20 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-10-26 17:16:20 +0100 |
commit | 5719207dfa14cfed63e0446f7f7a8343575a465f (patch) | |
tree | 3b4f512326882604aaef0009c0ae7f3d2c514961 /src/decoder/plugins/GmeDecoderPlugin.cxx | |
parent | a84fbbe32716ecee9c8a02b50251097fc35709ec (diff) | |
download | mpd-5719207dfa14cfed63e0446f7f7a8343575a465f.tar.gz mpd-5719207dfa14cfed63e0446f7f7a8343575a465f.tar.xz mpd-5719207dfa14cfed63e0446f7f7a8343575a465f.zip |
gme: don't loop forever, fall back to GME's default play length
Fixes http://bugs.musicpd.org/view.php?id=4432
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/GmeDecoderPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/plugins/GmeDecoderPlugin.cxx b/src/decoder/plugins/GmeDecoderPlugin.cxx index bbe2596c9..b47e9ea66 100644 --- a/src/decoder/plugins/GmeDecoderPlugin.cxx +++ b/src/decoder/plugins/GmeDecoderPlugin.cxx @@ -156,7 +156,7 @@ gme_file_decode(Decoder &decoder, Path path_fs) return; } - const int length = ti->length; + const int length = ti->play_length; gme_free_info(ti); const SignedSongTime song_len = length > 0 @@ -239,9 +239,9 @@ gme_scan_file(Path path_fs, assert(ti != nullptr); - if (ti->length > 0) + if (ti->play_length > 0) tag_handler_invoke_duration(handler, handler_ctx, - SongTime::FromMS(ti->length)); + SongTime::FromMS(ti->play_length)); if (ti->song != nullptr) { if (gme_track_count(emu) > 1) { |