From 8c1677fc3f38176ea2a986389eb1dcc511c3d100 Mon Sep 17 00:00:00 2001 From: Anish Date: Sat, 12 Jan 2019 00:51:59 +0530 Subject: [PATCH] Fixed infinite loop at end of video. A missing condition caused infinite looping, despite the video playing flag being set to false. Small change to fix. Fixes: #20552 --- modules/gdnative/videodecoder/video_stream_gdnative.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index 8239d57a779..a1590cef432 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp +++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp @@ -164,7 +164,7 @@ void VideoStreamPlaybackGDNative::update(float p_delta) { } } - while (interface->get_playback_position(data_struct) < time) { + while (interface->get_playback_position(data_struct) < time && playing) { update_texture(); }