mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
deps/media-playback: Fix pause continually running loop
Fixes an issue where when paused, the thread loop would continue to repeat endlessly until unpaused.
This commit is contained in:
parent
358f453938
commit
2ac1ad5290
3
deps/media-playback/media-playback/media.c
vendored
3
deps/media-playback/media-playback/media.c
vendored
|
@ -679,9 +679,10 @@ static inline bool mp_media_thread(mp_media_t *m)
|
|||
|
||||
pthread_mutex_lock(&m->mutex);
|
||||
is_active = m->active;
|
||||
pause = m->pause;
|
||||
pthread_mutex_unlock(&m->mutex);
|
||||
|
||||
if (!is_active) {
|
||||
if (!is_active || pause) {
|
||||
if (os_sem_wait(m->sem) < 0)
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue