diff --git a/modules/globebrowsing/src/tileprovider/ffmpegtileprovider.cpp b/modules/globebrowsing/src/tileprovider/ffmpegtileprovider.cpp index 76839d9156..7dd1b0e730 100644 --- a/modules/globebrowsing/src/tileprovider/ffmpegtileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/ffmpegtileprovider.cpp @@ -311,10 +311,9 @@ void FfmpegTileProvider::reset() { if (_videoFile.empty()) { return; } - - // TODO: This should probalby be repolaced with a call to internal - // initialize when that is fixed _tileIsReady = false; + internalDeinitialize(); + internalInitialize(); } @@ -411,6 +410,10 @@ void FfmpegTileProvider::internalInitialize() { FfmpegTileProvider::~FfmpegTileProvider() { // TODO: Check so internalDeinitialize is called after the last // update function and move code there + +} + +void FfmpegTileProvider::internalDeinitialize() { avformat_close_input(&_formatContext); av_free(_avFrame); av_free(_glFrame); @@ -418,8 +421,4 @@ FfmpegTileProvider::~FfmpegTileProvider() { avformat_free_context(_formatContext); } -void FfmpegTileProvider::internalDeinitialize() { - -} - } // namespace openspace::globebrowsing