Log audio decoding errors
Originally committed to SVN as r6961.
This commit is contained in:
parent
79684d5ad6
commit
18db0b09ac
1 changed files with 6 additions and 0 deletions
|
@ -64,9 +64,15 @@ void AudioProvider::GetAudioWithVolume(void *buf, int64_t start, int64_t count,
|
|||
try {
|
||||
GetAudio(buf,start,count);
|
||||
}
|
||||
catch (AudioDecodeError const& e) {
|
||||
LOG_E("audio_provider") << e.GetChainedMessage();
|
||||
memset(buf, 0, count*bytes_per_sample);
|
||||
return;
|
||||
}
|
||||
catch (...) {
|
||||
// FIXME: Poor error handling though better than none, to patch issue #800.
|
||||
// Just return blank audio if real provider fails.
|
||||
LOG_E("audio_provider") << "Unknown audio decoding error";
|
||||
memset(buf, 0, count*bytes_per_sample);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue