浏览代码

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
Anish 6 年之前
父节点
当前提交
8c1677fc3f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdnative/videodecoder/video_stream_gdnative.cpp

+ 1 - 1
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();
 	}