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