mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: destruct stream only if it is not already destructed
https://bugzilla.redhat.com/show_bug.cgi?id=551842
This commit is contained in:
parent
345547853b
commit
21250ff1a7
1 changed files with 15 additions and 13 deletions
|
|
@ -823,12 +823,13 @@ static int stop_stream_fd(struct userdata *u) {
|
|||
|
||||
pa_assert(u);
|
||||
pa_assert(u->rtpoll);
|
||||
pa_assert(u->rtpoll_item);
|
||||
pa_assert(u->stream_fd >= 0);
|
||||
|
||||
if (u->rtpoll_item) {
|
||||
pa_rtpoll_item_free(u->rtpoll_item);
|
||||
u->rtpoll_item = NULL;
|
||||
}
|
||||
|
||||
if (u->stream_fd >= 0) {
|
||||
memset(msg.buf, 0, BT_SUGGESTED_BUFFER_SIZE);
|
||||
msg.start_req.h.type = BT_REQUEST;
|
||||
msg.start_req.h.name = BT_STOP_STREAM;
|
||||
|
|
@ -840,6 +841,7 @@ static int stop_stream_fd(struct userdata *u) {
|
|||
|
||||
pa_close(u->stream_fd);
|
||||
u->stream_fd = -1;
|
||||
}
|
||||
|
||||
if (u->read_smoother) {
|
||||
pa_smoother_free(u->read_smoother);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue