decoder/sidplay: log detailed error message

This commit is contained in:
Max Kellermann 2016-07-29 16:59:17 +02:00
parent a4cd7411e8
commit 0bd25f1e17
2 changed files with 7 additions and 3 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.19.18 (not yet released)
- ffmpeg: log detailed error message - ffmpeg: log detailed error message
- ffmpeg: support FFmpeg 3.1 - ffmpeg: support FFmpeg 3.1
- sidplay: detect libsidplay2 with pkg-config - sidplay: detect libsidplay2 with pkg-config
- sidplay: log detailed error message
* output * output
- shout: recognize setting "encoder" instead of "encoding" - shout: recognize setting "encoder" instead of "encoding"
* require gcc 4.7 or newer * require gcc 4.7 or newer

View File

@ -154,7 +154,8 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
const auto container = ParseContainerPath(path_fs); const auto container = ParseContainerPath(path_fs);
SidTuneMod tune(container.path.c_str()); SidTuneMod tune(container.path.c_str());
if (!tune.getStatus()) { if (!tune.getStatus()) {
LogWarning(sidplay_domain, "failed to load file"); FormatWarning(sidplay_domain, "failed to load file: %s",
tune.getInfo().statusString);
return; return;
} }
@ -180,13 +181,15 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
ReSIDBuilder builder("ReSID"); ReSIDBuilder builder("ReSID");
builder.create(player.info().maxsids); builder.create(player.info().maxsids);
if (!builder) { if (!builder) {
LogWarning(sidplay_domain, "ReSIDBuilder.create() failed"); FormatWarning(sidplay_domain, "ReSIDBuilder.create() failed: %s",
builder.error());
return; return;
} }
builder.filter(filter_setting); builder.filter(filter_setting);
if (!builder) { if (!builder) {
LogWarning(sidplay_domain, "ReSIDBuilder.filter() failed"); FormatWarning(sidplay_domain, "ReSIDBuilder.filter() failed: %s",
builder.error());
return; return;
} }