SHA256
1
0
forked from pool/xine-lib
xine-lib/xine-lib-1.1.17-glitch-free-pulseaudio.patch
OBS User autobuild 7f0ad371b5 Accepting request 30112 from multimedia:xine
Copy from multimedia:xine/xine-lib based on submit request 30112 from user lnussel

OBS-URL: https://build.opensuse.org/request/show/30112
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xine-lib?expand=0&rev=28
2010-01-21 10:30:03 +00:00

24 lines
917 B
Diff

Index: xine-lib-1.1.17/src/xine-engine/audio_out.c
===================================================================
--- xine-lib-1.1.17.orig/src/xine-engine/audio_out.c
+++ xine-lib-1.1.17/src/xine-engine/audio_out.c
@@ -1156,8 +1156,17 @@ static void *ao_loop (void *this_gen) {
/*
* calculate gap:
+ *
+ * HACK (rwa): If we have no video stream we do not need an AV sync and so
+ * we assume a gap of 0. This seems to avoid the skips in the
+ * first seconds when playing audio-only via the "glitch-free"
+ * pulseaudio server.
*/
- gap = in_buf->vpts - hw_vpts;
+ if (in_buf && in_buf->stream && in_buf->stream->video_decoder_plugin) {
+ gap = in_buf->vpts - hw_vpts;
+ } else {
+ gap = 0;
+ }
lprintf ("hw_vpts : %" PRId64 " buffer_vpts : %" PRId64 " gap : %" PRId64 "\n",
hw_vpts, in_buf->vpts, gap);