Explorar o código

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.
Bart van Strien %!s(int64=6) %!d(string=hai) anos
pai
achega
932068e777
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/modules/graphics/Video.cpp

+ 2 - 0
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()