bluez5: iso-io: ensure streams are initially marked idle

Mark streams idle when they are being stopped/started, so that the
pause-to-sync logic always triggers when they are added.
This commit is contained in:
Pauli Virtanen 2023-04-06 18:06:29 +03:00 committed by Wim Taymans
parent 6e94487057
commit ae76789f24

View file

@ -286,6 +286,7 @@ struct stream *stream_create(int fd, bool sink, struct group *group)
stream->fd = fd;
stream->sink = sink;
stream->group = group;
stream->idle = true;
stream->this.duration = group->duration;
stream_link(group, stream);
@ -366,6 +367,8 @@ void spa_bt_iso_io_set_cb(struct spa_bt_iso_io *this, spa_bt_iso_io_pull_t pull,
else if (enabled && !was_enabled)
set_timers(stream->group);
stream->idle = true;
if (pull == NULL) {
stream->this.size = 0;
return;