浏览代码

libobs: Fix bug with frame output handling

The boolean variables which stored whether frames have been
rendered/downloaded/converted/etc were not being reset when video
restarted, causing frames to not be sent in the correct order whenever
video was reset.  This could lead to minor desync of video/audio.
jp9000 11 年之前
父节点
当前提交
11dd7912ce
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      libobs/obs.c

+ 9 - 0
libobs/obs.c

@@ -395,6 +395,15 @@ static void obs_free_video(void)
 
 		circlebuf_free(&video->timestamp_buffer);
 
+		memset(&video->textures_rendered, 0,
+				sizeof(video->textures_rendered));
+		memset(&video->textures_output, 0,
+				sizeof(video->textures_output));
+		memset(&video->textures_copied, 0,
+				sizeof(video->textures_copied));
+		memset(&video->textures_converted, 0,
+				sizeof(video->textures_converted));
+
 		video->cur_texture = 0;
 	}
 }