From 932068e77704673519b71106898e9727abfd0e5d Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sun, 11 Aug 2019 15:34:00 +0200 Subject: [PATCH] Stop the attached Source when a Video gets destroyed Before it would end up paused, but this means the audio playback thread will still keep it alive. Since there are no other references, there is no way to then free that Source anymore. --- src/modules/graphics/Video.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/graphics/Video.cpp b/src/modules/graphics/Video.cpp index dc3c2c418..5bb2abb34 100644 --- a/src/modules/graphics/Video.cpp +++ b/src/modules/graphics/Video.cpp @@ -96,6 +96,8 @@ Video::Video(Graphics *gfx, love::video::VideoStream *stream, float dpiscale) Video::~Video() { + if (source) + source->stop(); } love::video::VideoStream *Video::getStream()