forked from mia/Aegisub
More minox fixes (well, maybe) to subs preview
Originally committed to SVN as r1380.
This commit is contained in:
parent
4126b0e5bc
commit
a9df544cee
2 changed files with 5 additions and 4 deletions
|
@ -90,10 +90,11 @@ void SubtitlesPreview::SetStyle(AssStyle *_style) {
|
||||||
delete tmpStyle;
|
delete tmpStyle;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete style;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
delete style;
|
|
||||||
style = tmpStyle;
|
style = tmpStyle;
|
||||||
UpdateBitmap();
|
UpdateBitmap();
|
||||||
}
|
}
|
||||||
|
@ -149,7 +150,7 @@ void SubtitlesPreview::UpdateBitmap(int w,int h) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Provider OK
|
// Provider OK
|
||||||
if (provider) {
|
if (provider && provider->CanRaster()) {
|
||||||
// Generate subtitles
|
// Generate subtitles
|
||||||
AssFile *subs = new AssFile();
|
AssFile *subs = new AssFile();
|
||||||
subs->LoadDefault();
|
subs->LoadDefault();
|
||||||
|
@ -166,8 +167,8 @@ void SubtitlesPreview::UpdateBitmap(int w,int h) {
|
||||||
provider->DrawSubtitles(frame,0.1);
|
provider->DrawSubtitles(frame,0.1);
|
||||||
}
|
}
|
||||||
catch (...) {}
|
catch (...) {}
|
||||||
delete provider;
|
|
||||||
}
|
}
|
||||||
|
if (provider) delete provider;
|
||||||
|
|
||||||
// Convert frame to bitmap
|
// Convert frame to bitmap
|
||||||
wxMemoryDC dc(*bmp);
|
wxMemoryDC dc(*bmp);
|
||||||
|
|
|
@ -143,7 +143,7 @@ void CSRISubtitlesProvider::LoadSubtitles(AssFile *subs) {
|
||||||
renderer = csri_renderer_default();
|
renderer = csri_renderer_default();
|
||||||
if (!renderer) {
|
if (!renderer) {
|
||||||
delete subs;
|
delete subs;
|
||||||
throw _T("No CSRI renderer available. Try installing one or switch to another subtitle provider.");
|
throw _T("No CSRI renderer available, cannot show subtitles. Try installing one or switch to another subtitle provider.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue