decoder/{dsdiff,dsf,mpg123,wavpack}: avoid exceptions in scan methods

The scan methods must be "noexcept".
This commit is contained in:
Max Kellermann
2018-01-25 13:01:39 +01:00
parent 47fa8c4cf6
commit fd0a5a1116
4 changed files with 33 additions and 13 deletions

View File

@@ -292,7 +292,12 @@ mpd_mpg123_scan_file(Path path_fs,
}
AudioFormat audio_format;
if (!mpd_mpg123_open(handle, path_fs.c_str(), audio_format)) {
try {
if (!mpd_mpg123_open(handle, path_fs.c_str(), audio_format)) {
mpg123_delete(handle);
return false;
}
} catch (...) {
mpg123_delete(handle);
return false;
}