mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
stream: guard against node destroy
This commit is contained in:
parent
ef8114ff0c
commit
8ab70d02dc
1 changed files with 1 additions and 1 deletions
|
|
@ -2330,7 +2330,7 @@ int pw_stream_flush(struct pw_stream *stream, bool drain)
|
||||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||||
pw_loop_invoke(impl->context->data_loop,
|
pw_loop_invoke(impl->context->data_loop,
|
||||||
drain ? do_drain : do_flush, 1, NULL, 0, true, impl);
|
drain ? do_drain : do_flush, 1, NULL, 0, true, impl);
|
||||||
if (!drain)
|
if (!drain && impl->node != NULL)
|
||||||
spa_node_send_command(impl->node->node,
|
spa_node_send_command(impl->node->node,
|
||||||
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Flush));
|
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Flush));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue