diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/theora/video_stream_theora.cpp | 8 | ||||
-rw-r--r-- | drivers/theora/video_stream_theora.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/theora/video_stream_theora.cpp b/drivers/theora/video_stream_theora.cpp index 3fad19b476..3c214ce48a 100644 --- a/drivers/theora/video_stream_theora.cpp +++ b/drivers/theora/video_stream_theora.cpp @@ -476,11 +476,13 @@ Ref<Texture> VideoStreamPlaybackTheora::get_texture() { void VideoStreamPlaybackTheora::update(float p_delta) { - if (!playing) { + if (!playing || paused) { //printf("not playing\n"); return; }; + + #ifdef THEORA_USE_THREAD_STREAMING thread_sem->post(); #endif @@ -730,12 +732,13 @@ bool VideoStreamPlaybackTheora::is_playing() const { void VideoStreamPlaybackTheora::set_paused(bool p_paused) { + paused=p_paused; //pau = !p_paused; }; bool VideoStreamPlaybackTheora::is_paused(bool p_paused) const { - return playing; + return paused; }; void VideoStreamPlaybackTheora::set_loop(bool p_enable) { @@ -830,6 +833,7 @@ VideoStreamPlaybackTheora::VideoStreamPlaybackTheora() { playing = false; frames_pending = 0; videobuf_time = 0; + paused=false; buffering=false; texture = Ref<ImageTexture>( memnew(ImageTexture )); diff --git a/drivers/theora/video_stream_theora.h b/drivers/theora/video_stream_theora.h index c15ef31cfc..3e144c0125 100644 --- a/drivers/theora/video_stream_theora.h +++ b/drivers/theora/video_stream_theora.h @@ -69,6 +69,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback { AudioMixCallback mix_callback; void* mix_udata; + bool paused; #ifdef THEORA_USE_THREAD_STREAMING |