aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--src/VideoPlayer.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 544167b..a618000 100644
--- a/README.md
+++ b/README.md
@@ -18,4 +18,5 @@ For manga, view the next chapter when reaching the end of a chapter.
Make network requests asynchronous to not freeze gui when navigating. Also have loading animation.
Retain search text when navigating back.
Disable ytdl_hook subtitles. If a video has subtitles for many languages, then it will stall video playback for several seconds
-until all subtitles have been downloaded and loaded. \ No newline at end of file
+until all subtitles have been downloaded and loaded.
+Figure out why memory usage doesn't drop much when killing the video player. Is it a bug in proprietary nvidia drivers on gnu/linux? \ No newline at end of file
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 7ce5f19..41b6d0e 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -185,6 +185,8 @@ namespace QuickMedia {
{
video_size.x = w;
video_size.y = h;
+ context.reset(new sf::Context(sf::ContextSettings(), w, h));
+ context->setActive(true);
// TODO: Verify if it's valid to re-create the texture like this,
// instead of using deconstructor
if(texture.create(w, h)) {
@@ -192,8 +194,6 @@ namespace QuickMedia {
if(newTextureBuf)
textureBuffer = (sf::Uint8*)newTextureBuf;
}
- context.reset(new sf::Context(sf::ContextSettings(), w, h));
- context->setActive(true);
glViewport(0, 0, w, h);
context->setActive(false);
resize(desired_size);