From 29460b97b95f936b7dc4601a058d2902ab3e5700 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 22 Dec 2011 21:29:38 +0000 Subject: [PATCH] Rearrange VideoContext::Reset to fix error on shutdown Originally committed to SVN as r6127. --- aegisub/src/video_context.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aegisub/src/video_context.cpp b/aegisub/src/video_context.cpp index 0676273af..2e31eac8d 100644 --- a/aegisub/src/video_context.cpp +++ b/aegisub/src/video_context.cpp @@ -108,12 +108,6 @@ VideoContext *VideoContext::Get() { void VideoContext::Reset() { StandardPaths::SetPathValue("?video", ""); - keyFrames.clear(); - keyFramesFilename.clear(); - videoFPS = agi::vfr::Framerate(); - KeyframesOpen(keyFrames); - if (!ovrFPS.IsLoaded()) TimecodesOpen(videoFPS); - // Remove video data Stop(); frame_n = 0; @@ -124,6 +118,12 @@ void VideoContext::Reset() { // Remove provider provider.reset(); videoProvider = 0; + + keyFrames.clear(); + keyFramesFilename.clear(); + videoFPS = agi::vfr::Framerate(); + KeyframesOpen(keyFrames); + if (!ovrFPS.IsLoaded()) TimecodesOpen(videoFPS); } void VideoContext::SetContext(agi::Context *context) {