mirror of
https://gitee.com/openharmony/third_party_alsa-utils
synced 2024-11-23 07:00:15 +00: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
@ -707,6 +707,10 @@ void *record_alsa(struct bat *bat)
|
||||
err = latencytest_process_input(&sndpcm, bat);
|
||||
else
|
||||
err = read_from_pcm_loop(&sndpcm, bat);
|
||||
|
||||
pthread_cleanup_pop(0);
|
||||
pthread_cleanup_pop(0);
|
||||
|
||||
if (err != 0) {
|
||||
retval_record = err;
|
||||
goto exit3;
|
||||
@ -715,9 +719,6 @@ void *record_alsa(struct bat *bat)
|
||||
/* Normally we will never reach this part of code (unless error in
|
||||
* previous call) (before exit3) as this thread will be cancelled
|
||||
* by end of play thread. Except in single line mode. */
|
||||
pthread_cleanup_pop(0);
|
||||
pthread_cleanup_pop(0);
|
||||
|
||||
snd_pcm_drain(sndpcm.handle);
|
||||
pthread_exit(&retval_record);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user