Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs: Fix wrong order for source->async_mutex #11688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libobs/obs-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,9 @@ static void async_tick(obs_source_t *source)
{
uint64_t sys_time = obs->video.video_time;

/* gs should be requested before async_mutex
Here we request gs because set_async_texture_size may be called */
gs_enter_context(obs->video.graphics);
pthread_mutex_lock(&source->async_mutex);

if (deinterlacing_enabled(source)) {
Expand All @@ -1208,6 +1211,7 @@ static void async_tick(obs_source_t *source)
source->async_update_texture = set_async_texture_size(source, source->cur_async_frame);

pthread_mutex_unlock(&source->async_mutex);
gs_leave_context();
}

void obs_source_video_tick(obs_source_t *source, float seconds)
Expand Down
Loading