Explorar o código

maybe fix stop issue in theora

Juan Linietsky %!s(int64=9) %!d(string=hai) anos
pai
achega
800c575b13
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      drivers/theora/video_stream_theora.cpp

+ 5 - 1
drivers/theora/video_stream_theora.cpp

@@ -178,7 +178,7 @@ void VideoStreamPlaybackTheora::video_write(void){
 
 void VideoStreamPlaybackTheora::clear() {
 
-	if (file_name == "")
+	if (!file)
 		return;
 
 	if(vorbis_p){
@@ -208,6 +208,10 @@ void VideoStreamPlaybackTheora::clear() {
 	frames_pending = 0;
 	videobuf_time = 0;
 
+	if (file) {
+		memdelete(file);
+	}
+	file=NULL;
 	playing = false;
 };