mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
hook: return number of hooks called
Do finish_format ourselved when nobody was listening for the format change.
This commit is contained in:
parent
fb7a51c6e7
commit
8cadcd7f56
2 changed files with 13 additions and 4 deletions
|
|
@ -800,6 +800,8 @@ client_node_port_set_param(void *data,
|
|||
struct pw_type *t = &stream->remote->core->type;
|
||||
|
||||
if (id == t->param.idFormat) {
|
||||
int count;
|
||||
|
||||
pw_log_debug("stream %p: format changed %d", stream, seq);
|
||||
|
||||
if (impl->format)
|
||||
|
|
@ -814,9 +816,12 @@ client_node_port_set_param(void *data,
|
|||
|
||||
impl->pending_seq = seq;
|
||||
|
||||
spa_hook_list_call(&stream->listener_list,
|
||||
struct pw_stream_events,
|
||||
format_changed, impl->format);
|
||||
count = spa_hook_list_call(&stream->listener_list,
|
||||
struct pw_stream_events,
|
||||
format_changed, impl->format);
|
||||
|
||||
if (count == 0)
|
||||
pw_stream_finish_format(stream, 0, NULL, 0);
|
||||
|
||||
if (impl->format)
|
||||
stream_set_state(stream, PW_STREAM_STATE_READY, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue