From 59988161a000851a4f0bc90f3fdcfe375571db35 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 6 Aug 2019 17:49:42 +0200 Subject: Restart videoplayer when changing video, to fix loadfile video bug --- src/VideoPlayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/VideoPlayer.cpp') diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 41b6d0e..dbfcaac 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -54,11 +54,11 @@ namespace QuickMedia { onPlaybackEndedCallback(nullptr), mpv(nullptr), mpvGl(nullptr), - context(std::make_unique(sf::ContextSettings(), width, height)), + context(nullptr), textureBuffer(nullptr), desired_size(width, height) { - ContextScope context_scope(context.get()); + //ContextScope context_scope(context.get()); texture.setSmooth(true); // mpv_create requires LC_NUMERIC to be set to "C" for some reason, see mpv_create documentation -- cgit v1.2.3