VideoStreamGDNative: close file in cleanup

We should close the file handle when we are done.
This commit is contained in:
Mark Kuo 2020-06-28 10:20:07 +10:00
parent 27378524f2
commit 3b05d2c989
1 changed files with 5 additions and 0 deletions

View File

@ -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;