mirror of
https://gitlab.com/GloriousEggroll/obs-studio-nobara.git
synced 2025-12-11 00:00:01 -05:00
update to latest build
This commit is contained in:
40
7129.patch
Normal file
40
7129.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From ec24712c6da006eb166cb9df85df0b6c1e7ac806 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Stanway <r1ch@r1ch.net>
|
||||
Date: Thu, 18 Aug 2022 23:17:48 +0200
|
||||
Subject: [PATCH] libobs: Initialize main_view video mix before video thread
|
||||
|
||||
Fixes a race condition where the video thread would exit because it sees
|
||||
no active mixes, causing OBS to freeze on startup.
|
||||
|
||||
Fixes #7095
|
||||
---
|
||||
libobs/obs.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libobs/obs.c b/libobs/obs.c
|
||||
index 83ef5058a663..cef1ae98e60f 100644
|
||||
--- a/libobs/obs.c
|
||||
+++ b/libobs/obs.c
|
||||
@@ -646,6 +646,11 @@ static int obs_init_video(struct obs_video_info *ovi)
|
||||
if (pthread_mutex_init(&video->mixes_mutex, NULL) < 0)
|
||||
return OBS_VIDEO_FAIL;
|
||||
|
||||
+ video->ovi = *ovi;
|
||||
+
|
||||
+ if (!obs_view_add(&obs->data.main_view))
|
||||
+ return OBS_VIDEO_FAIL;
|
||||
+
|
||||
int errorcode;
|
||||
#ifdef __APPLE__
|
||||
errorcode = pthread_create(&video->video_thread, NULL,
|
||||
@@ -658,10 +663,6 @@ static int obs_init_video(struct obs_video_info *ovi)
|
||||
return OBS_VIDEO_FAIL;
|
||||
|
||||
video->thread_initialized = true;
|
||||
- video->ovi = *ovi;
|
||||
-
|
||||
- if (!obs_view_add(&obs->data.main_view))
|
||||
- return OBS_VIDEO_FAIL;
|
||||
|
||||
return OBS_VIDEO_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user