mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user