mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:15:43 +01:00
bat: alsa.c - move the thread cleanup pop before goto exit3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
588b3aa0ef
commit
b9b40a2a9f
4 changed files with 1350 additions and 938 deletions
|
@ -707,6 +707,10 @@ void *record_alsa(struct bat *bat)
|
||||||
err = latencytest_process_input(&sndpcm, bat);
|
err = latencytest_process_input(&sndpcm, bat);
|
||||||
else
|
else
|
||||||
err = read_from_pcm_loop(&sndpcm, bat);
|
err = read_from_pcm_loop(&sndpcm, bat);
|
||||||
|
|
||||||
|
pthread_cleanup_pop(0);
|
||||||
|
pthread_cleanup_pop(0);
|
||||||
|
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
retval_record = err;
|
retval_record = err;
|
||||||
goto exit3;
|
goto exit3;
|
||||||
|
@ -715,9 +719,6 @@ void *record_alsa(struct bat *bat)
|
||||||
/* Normally we will never reach this part of code (unless error in
|
/* Normally we will never reach this part of code (unless error in
|
||||||
* previous call) (before exit3) as this thread will be cancelled
|
* previous call) (before exit3) as this thread will be cancelled
|
||||||
* by end of play thread. Except in single line mode. */
|
* by end of play thread. Except in single line mode. */
|
||||||
pthread_cleanup_pop(0);
|
|
||||||
pthread_cleanup_pop(0);
|
|
||||||
|
|
||||||
snd_pcm_drain(sndpcm.handle);
|
snd_pcm_drain(sndpcm.handle);
|
||||||
pthread_exit(&retval_record);
|
pthread_exit(&retval_record);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue