mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-13 13:30:05 -05:00
stream: copy position before going to STREAMING
So that get_time_n will return values as soon as we go to STREAMING. Fixes #3995
This commit is contained in:
parent
88e9f7683c
commit
f73d3e4af9
1 changed files with 2 additions and 1 deletions
|
|
@ -665,12 +665,13 @@ static int impl_send_command(void *object, const struct spa_command *command)
|
||||||
break;
|
break;
|
||||||
case SPA_NODE_COMMAND_Start:
|
case SPA_NODE_COMMAND_Start:
|
||||||
if (stream->state == PW_STREAM_STATE_PAUSED) {
|
if (stream->state == PW_STREAM_STATE_PAUSED) {
|
||||||
pw_log_debug("%p: start %d", stream, impl->direction);
|
pw_log_debug("%p: start direction:%d", stream, impl->direction);
|
||||||
|
|
||||||
if (impl->direction == SPA_DIRECTION_INPUT) {
|
if (impl->direction == SPA_DIRECTION_INPUT) {
|
||||||
if (impl->io != NULL)
|
if (impl->io != NULL)
|
||||||
impl->io->status = SPA_STATUS_NEED_DATA;
|
impl->io->status = SPA_STATUS_NEED_DATA;
|
||||||
}
|
}
|
||||||
|
copy_position(impl, impl->queued.incount);
|
||||||
stream_set_state(stream, PW_STREAM_STATE_STREAMING, 0, NULL);
|
stream_set_state(stream, PW_STREAM_STATE_STREAMING, 0, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue