mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
libobs: Hold async mutex when calling set_async_texture_size
Calling set_async_texture_size without holding async_mutex is dangerous as cur_async_frame could be changed / freed by another thread.
This commit is contained in:
+2
-2
@@ -1225,11 +1225,11 @@ static void async_tick(obs_source_t *source)
|
||||
filter_frame(source, &source->prev_async_frame);
|
||||
filter_frame(source, &source->cur_async_frame);
|
||||
|
||||
pthread_mutex_unlock(&source->async_mutex);
|
||||
|
||||
if (source->cur_async_frame)
|
||||
source->async_update_texture =
|
||||
set_async_texture_size(source, source->cur_async_frame);
|
||||
|
||||
pthread_mutex_unlock(&source->async_mutex);
|
||||
}
|
||||
|
||||
void obs_source_video_tick(obs_source_t *source, float seconds)
|
||||
|
||||
Reference in New Issue
Block a user