diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-09-15 13:11:31 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-09-15 13:22:41 +0200 |
commit | c10feda5ce67c5cf340fbbe9359a81f83c557927 (patch) | |
tree | fecc74638b084d4bae8c8b8798a6fc96dc210fe3 | |
parent | 8825a21e86e9269d0cd09c792663b6c84070f20a (diff) |
merger: follow the position duration if we can
-rw-r--r-- | spa/plugins/audioconvert/merger.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c index 641d3d5b..482f908c 100644 --- a/spa/plugins/audioconvert/merger.c +++ b/spa/plugins/audioconvert/merger.c @@ -977,7 +977,11 @@ static int impl_node_process(void *object) dd = &dbuf->buf->datas[0]; maxsize = dd->maxsize; - n_samples = maxsize / outport->stride; + + if (SPA_LIKELY(this->io_position)) + n_samples = this->io_position->clock.duration; + else + n_samples = maxsize / outport->stride; src_datas = alloca(sizeof(void*) * this->port_count); |