mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
stream: make ticks continuous on DISCONT
A discont of the clock does not mean a discont in the stream, so keep the ticks continuous.
This commit is contained in:
parent
abb55697c1
commit
f65f5cf866
2 changed files with 4 additions and 2 deletions
|
|
@ -1970,7 +1970,8 @@ int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time)
|
|||
if (SPA_LIKELY(p != NULL)) {
|
||||
impl->time.now = p->clock.nsec;
|
||||
impl->time.rate = p->clock.rate;
|
||||
if (SPA_UNLIKELY(impl->clock_id != p->clock.id)) {
|
||||
if (SPA_UNLIKELY(impl->clock_id != p->clock.id ||
|
||||
SPA_FLAG_IS_SET(p->clock.flags, SPA_IO_CLOCK_FLAG_DISCONT))) {
|
||||
impl->base_pos = p->clock.position - impl->time.ticks;
|
||||
impl->clock_id = p->clock.id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -643,7 +643,8 @@ static inline void copy_position(struct stream *impl, int64_t queued)
|
|||
if (SPA_LIKELY(p != NULL)) {
|
||||
impl->time.now = p->clock.nsec;
|
||||
impl->time.rate = p->clock.rate;
|
||||
if (SPA_UNLIKELY(impl->clock_id != p->clock.id)) {
|
||||
if (SPA_UNLIKELY(impl->clock_id != p->clock.id ||
|
||||
SPA_FLAG_IS_SET(p->clock.flags, SPA_IO_CLOCK_FLAG_DISCONT))) {
|
||||
impl->base_pos = p->clock.position - impl->time.ticks;
|
||||
impl->clock_id = p->clock.id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue