mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
libobs: Add missing mutex unlocks to some filter functions
Detected by Coverity Scan (CID 12831, 12830)
This commit is contained in:
parent
55dd8f8726
commit
4b9d0256c8
@ -1532,6 +1532,7 @@ void obs_source_filter_add(obs_source_t *source, obs_source_t *filter)
|
|||||||
if (da_find(source->filters, &filter, 0) != DARRAY_INVALID) {
|
if (da_find(source->filters, &filter, 0) != DARRAY_INVALID) {
|
||||||
blog(LOG_WARNING, "Tried to add a filter that was already "
|
blog(LOG_WARNING, "Tried to add a filter that was already "
|
||||||
"present on the source");
|
"present on the source");
|
||||||
|
pthread_mutex_unlock(&source->filter_mutex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1565,8 +1566,10 @@ static bool obs_source_filter_remove_refless(obs_source_t *source,
|
|||||||
pthread_mutex_lock(&source->filter_mutex);
|
pthread_mutex_lock(&source->filter_mutex);
|
||||||
|
|
||||||
idx = da_find(source->filters, &filter, 0);
|
idx = da_find(source->filters, &filter, 0);
|
||||||
if (idx == DARRAY_INVALID)
|
if (idx == DARRAY_INVALID) {
|
||||||
|
pthread_mutex_unlock(&source->filter_mutex);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
obs_source_t *prev = source->filters.array[idx-1];
|
obs_source_t *prev = source->filters.array[idx-1];
|
||||||
|
Loading…
Reference in New Issue
Block a user