Specifically catch exceptions thrown by the subtitle renderer so that we can give a slightly more useful error message.

Originally committed to SVN as r4238.
This commit is contained in:
Thomas Goyne 2010-04-22 01:09:16 +00:00
parent aa417cf903
commit 792c8ec66e

View file

@ -411,7 +411,12 @@ AegiVideoFrame VideoContext::GetFrame(int n,bool raw) {
// Raster subtitles if available/necessary
if (!raw && subsProvider) {
tempFrame.CopyFrom(frame);
subsProvider->DrawSubtitles(tempFrame,VFR_Input.GetTimeAtFrame(n,true,true)/1000.0);
try {
subsProvider->DrawSubtitles(tempFrame,VFR_Input.GetTimeAtFrame(n,true,true)/1000.0);
}
catch (...) {
wxLogError(L"Subtitle rendering for the current frame failed.\n");
}
return tempFrame;
}