summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-11-04 09:46:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-11-04 09:46:25 -0300
commit800c575b13c75e1289be305a65aa0394a21afe7c (patch)
treeec6c6109738cb5317a2b27a6b753e067a8a59d35
parentf201aa22feabd552a41f0d65049095568b57f277 (diff)
maybe fix stop issue in theora
-rw-r--r--drivers/theora/video_stream_theora.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/theora/video_stream_theora.cpp b/drivers/theora/video_stream_theora.cpp
index 2d9f4f9f67..ed87227876 100644
--- a/drivers/theora/video_stream_theora.cpp
+++ b/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;
};