From 8103563530e6e5711f20bfef97141421520341fb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Aug 2019 18:17:43 +0200 Subject: Fix scaling issue --- include/VideoPlayer.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/VideoPlayer.hpp') diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index df08339..5fd5e60 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -32,15 +32,16 @@ namespace QuickMedia { void resize(const sf::Vector2i &size); void draw(sf::RenderWindow &window); + // @path can also be an url if youtube-dl is installed void load_file(const std::string &path); // This counter is incremented when mpv wants to redraw content std::atomic_int redrawCounter; - sf::Context context; PlaybackEndedCallback onPlaybackEndedCallback; private: mpv_handle *mpv; mpv_opengl_cb_context *mpvGl; + std::unique_ptr context; sf::Sprite sprite; sf::Texture texture; sf::Uint8 *textureBuffer; -- cgit v1.2.3