xine-lib/xine-lib-1.1.15-avsync_hack.patch
Rex Dieter 831b4c0a6c * Fri Jan 23 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1.16.1-1
- xine-lib-1.1.16.1
- include avsync patch (#470568)
2009-01-23 14:32:05 +00:00

23 lines
935 B
Diff

diff -uNr xine-lib-1.1.15.orig/src/xine-engine/audio_out.c xine-lib-1.1.15/src/xine-engine/audio_out.c
--- xine-lib-1.1.15.orig/src/xine-engine/audio_out.c 2008-07-10 18:19:10.000000000 +0200
+++ xine-lib-1.1.15/src/xine-engine/audio_out.c 2009-01-10 21:57:20.000000000 +0100
@@ -1151,8 +1151,17 @@
/*
* 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);