Explorar o código

VideoStreamGDNative: close file in cleanup

We should close the file handle when we are done.
Mark Kuo %!s(int64=5) %!d(string=hai) anos
pai
achega
3b05d2c989
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      modules/gdnative/videodecoder/video_stream_gdnative.cpp

+ 5 - 0
modules/gdnative/videodecoder/video_stream_gdnative.cpp

@@ -214,6 +214,11 @@ void VideoStreamPlaybackGDNative::cleanup() {
 	if (pcm) {
 		memfree(pcm);
 	}
+	if (file) {
+		file->close();
+		memdelete(file);
+		file = nullptr;
+	}
 	pcm = nullptr;
 	time = 0;
 	num_channels = -1;