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

View file

@ -108,12 +108,6 @@ VideoContext *VideoContext::Get() {
void VideoContext::Reset() { void VideoContext::Reset() {
StandardPaths::SetPathValue("?video", ""); StandardPaths::SetPathValue("?video", "");
keyFrames.clear();
keyFramesFilename.clear();
videoFPS = agi::vfr::Framerate();
KeyframesOpen(keyFrames);
if (!ovrFPS.IsLoaded()) TimecodesOpen(videoFPS);
// Remove video data // Remove video data
Stop(); Stop();
frame_n = 0; frame_n = 0;
@ -124,6 +118,12 @@ void VideoContext::Reset() {
// Remove provider // Remove provider
provider.reset(); provider.reset();
videoProvider = 0; videoProvider = 0;
keyFrames.clear();
keyFramesFilename.clear();
videoFPS = agi::vfr::Framerate();
KeyframesOpen(keyFrames);
if (!ovrFPS.IsLoaded()) TimecodesOpen(videoFPS);
} }
void VideoContext::SetContext(agi::Context *context) { void VideoContext::SetContext(agi::Context *context) {