decoder/sidplay: simplify seek loop

This commit is contained in:
Max Kellermann 2016-10-27 20:25:12 +02:00
parent f9a64d24bf
commit 11ba44870b

View File

@ -376,12 +376,9 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
}
/* ignore data until target time is reached */
while(data_time<target_time) {
nbytes=player.play(buffer, ARRAY_SIZE(buffer));
if(nbytes==0)
break;
while (data_time < target_time &&
player.play(buffer, ARRAY_SIZE(buffer)) > 0)
data_time = player.time();
}
decoder_command_finished(decoder);
}