Просмотр исходного кода

win-dshow: Ensure thread is joinable before joining

This may have been the issue behind the reported firefox crashes, but
strangely, the thread should always be joinable here because it's
explicitly always created in the constructor and joined in the
destructor.
jp9000 3 лет назад
Родитель
Сommit
0dbae4ebef
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      plugins/win-dshow/virtualcam-module/virtualcam-filter.cpp

+ 2 - 1
plugins/win-dshow/virtualcam-module/virtualcam-filter.cpp

@@ -112,7 +112,8 @@ VCamFilter::VCamFilter()
 VCamFilter::~VCamFilter()
 {
 	SetEvent(thread_stop);
-	th.join();
+	if (th.joinable())
+		th.join();
 	video_queue_close(vq);
 
 	if (placeholder.scaled_data)