diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index 6952315..34c581f 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: mollusk pkgname=peerspeak-git _pkgname=peerspeak -pkgver=0.6.1.r315.ga78860d +pkgver=0.6.2.r319.g8014edf pkgrel=1 pkgdesc="Decentralized peer-to-peer voice chat (Rust/iroh/PipeWire/Opus/iced)" arch=('x86_64') diff --git a/src/screenshare/mod.rs b/src/screenshare/mod.rs index 6a43122..51a8e6d 100644 --- a/src/screenshare/mod.rs +++ b/src/screenshare/mod.rs @@ -547,13 +547,19 @@ fn event_for_log(ev: &PixelpassEvent) -> String { } } -/// Open the viewer stream URL in a media player. Mirrors pixelpass's own -/// low-latency mpv invocation; falls back to vlc. The player is reaped in a -/// background task so it doesn't linger as a zombie when its window closes. +/// Open the viewer stream URL in a media player, then fall back to vlc. The +/// player is reaped in a background task so it doesn't linger as a zombie when +/// its window closes. +/// +/// The flags keep latency low while preserving A/V sync. We deliberately do +/// NOT pass mpv's `--untimed`: that displays each video frame the instant it +/// decodes, ignoring audio timestamps, which makes a shared *video* drift +/// progressively out of sync with its audio. Pacing to the audio clock costs a +/// little latency (negligible for pointing at a desktop) and keeps a shared +/// video in sync. fn launch_player(url: &str) -> std::io::Result<()> { const MPV_ARGS: &[&str] = &[ "--profile=low-latency", - "--untimed", "--hwdec=auto", "--audio-buffer=0.2", "--demuxer-max-bytes=2M",