2010-06-21 12:32:45 +00:00
|
|
|
diff -up xine-lib-1.1.17/src/xine-engine/audio_out.c.avsync_hack xine-lib-1.1.17/src/xine-engine/audio_out.c
|
|
|
|
--- xine-lib-1.1.17/src/xine-engine/audio_out.c.avsync_hack 2009-11-30 19:33:30.000000000 -0600
|
|
|
|
+++ xine-lib-1.1.17/src/xine-engine/audio_out.c 2009-12-02 09:07:37.622805780 -0600
|
|
|
|
@@ -1156,8 +1156,17 @@ static void *ao_loop (void *this_gen) {
|
|
|
|
|
2009-01-23 14:32:05 +00:00
|
|
|
/*
|
|
|
|
* 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) {
|
2010-06-21 12:32:45 +00:00
|
|
|
+ gap = in_buf->vpts - hw_vpts;
|
2009-01-23 14:32:05 +00:00
|
|
|
+ } else {
|
2010-06-21 12:32:45 +00:00
|
|
|
+ gap = 0;
|
2009-01-23 14:32:05 +00:00
|
|
|
+ }
|
|
|
|
lprintf ("hw_vpts : %" PRId64 " buffer_vpts : %" PRId64 " gap : %" PRId64 "\n",
|
|
|
|
hw_vpts, in_buf->vpts, gap);
|
|
|
|
|