[vlc-commits] [Git][videolan/vlc][master] pulse: assume pa_usec_t is in microseconds
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Feb 14 12:03:25 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
cd693748 by Steve Lhomme at 2025-02-14T11:28:34+00:00
pulse: assume pa_usec_t is in microseconds
As the name suggests.
VLC_TICK_FROM_US() is already used in many places for that.
The hardcoded value for DEMUX_GET_TIME was bogus.
- - - - -
1 changed file:
- modules/access/pulse.c
Changes:
=====================================
modules/access/pulse.c
=====================================
@@ -169,9 +169,9 @@ static void stream_read_cb(pa_stream *s, size_t length, void *userdata)
return;
}
if (negative)
- pts += latency;
+ pts += VLC_TICK_FROM_US(latency);
else
- pts -= latency;
+ pts -= VLC_TICK_FROM_US(latency);
es_out_SetPCR(demux->out, pts);
if (unlikely(sys->es == NULL))
@@ -206,7 +206,7 @@ static int Control(demux_t *demux, int query, va_list ap)
if (pa_stream_get_time(sys->stream, &us) < 0)
return VLC_EGENERIC;
- *(va_arg(ap, vlc_tick_t *)) = us * 10000000LL / CLOCK_FREQ;
+ *(va_arg(ap, vlc_tick_t *)) = VLC_TICK_FROM_US(us);
break;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cd69374820b39e0576df80a7d7b9241db3eeccd6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cd69374820b39e0576df80a7d7b9241db3eeccd6
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list