Fix crash when opening video

If video was previously open and the user chooses to resample the script
for the new video, VideoController would try to update the subs for the
now-deleted old provider.
This commit is contained in:
Thomas Goyne 2014-05-23 06:58:46 -07:00
parent e2754bcd90
commit 40ac2f9b44
1 changed files with 2 additions and 1 deletions

View File

@ -270,6 +270,8 @@ bool Project::DoLoadVideo(agi::fs::path const& path) {
return false;
}
AnnounceVideoProviderModified(video_provider.get());
UpdateVideoProperties(context->ass.get(), video_provider.get(), context->parent);
video_provider->LoadSubtitles(context->ass.get());
@ -288,7 +290,6 @@ bool Project::DoLoadVideo(agi::fs::path const& path) {
if (agi::fs::HasExtension(path, "mkv"))
video_has_subtitles = MatroskaWrapper::HasSubtitles(path);
AnnounceVideoProviderModified(video_provider.get());
AnnounceKeyframesModified(keyframes);
AnnounceTimecodesModified(timecodes);
return true;