diff options
author | Bartosz Golaszewski <brgl@bgdev.pl> | 2017-07-05 12:45:00 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2017-07-06 12:59:00 +0000 |
commit | 53538ff9492c5889db3bcbbbe17bc270d1e83cb1 (patch) | |
tree | 9708cc88ec61619f1b20216655711f9987a4163b /LICENSE.FDL | |
parent | 2b343affb7b16ff195bbc8139d2873b183292852 (diff) | |
download | qtmultimedia-53538ff9492c5889db3bcbbbe17bc270d1e83cb1.tar.gz |
PulseAudio: fix a pthread_mutex crash in error path
QSoundEffect (pulseaudio) uses a workaround for stability issues:
although the pulseaudio mainloop mutex is recursive, it utilizes a
separate lock counting. This is not the best solution, but it is a
part of a larger set of changes which improved the stability in CI
under heavy load.
QSoundEffect always calls pa_threaded_mainloop_lock/unlock() from the
same thread so the additional lock counting works in normal situation
even though it doesn't use atomic types.
However if pa_context_connect() fails, pa_threaded_mainloop_unlock()
is called without regard to current lock count. This leads to random
double-unlock aborts if pa_context_connect() fails more than once
(e.g. after the reconnect scheduled from onContextFailed()).
Fix this by always using the PulseDaemon wrappers around
pa_threaded_mainloop_lock/unlock().
Task-number: QTBUG-61725
Change-Id: I41eb9a76892a6646fd5620ef8f686473b339464f
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'LICENSE.FDL')
0 files changed, 0 insertions, 0 deletions