Rearrange VideoContext::Reset to fix error on shutdown

Originally committed to SVN as r6127.
This commit is contained in:
Thomas Goyne 2011-12-22 21:29:38 +00:00
parent 4133806fe7
commit 29460b97b9
1 changed files with 6 additions and 6 deletions

View File

@ -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) {