mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-11 15:58:45 -05:00
Make reset button work (it restarts the video from the beginning)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user