[Spice-devel] [PATCH spice-gtk 3/4] Fix video playback with GStreamer backend

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jun 8 03:13:28 PDT 2012


The playback audio delay is not correctly adjusted, we should take
min_latency, set by gst_bin_do_latency_func ().
---
 gtk/spice-gstaudio.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c
index 080169b..6dd250e 100644
--- a/gtk/spice-gstaudio.c
+++ b/gtk/spice-gstaudio.c
@@ -279,7 +279,10 @@ static gboolean update_mmtime_timeout_cb(gpointer data)
         gboolean live;
         GstClockTime minlat, maxlat;
         gst_query_parse_latency(q, &live, &minlat, &maxlat);
-        spice_playback_channel_set_delay(SPICE_PLAYBACK_CHANNEL(p->pchannel), GST_TIME_AS_MSECONDS(maxlat));
+        SPICE_DEBUG("got min latency %" GST_TIME_FORMAT ", max latency %"
+                    GST_TIME_FORMAT ", live %d", GST_TIME_ARGS (minlat),
+                    GST_TIME_ARGS (maxlat), live);
+        spice_playback_channel_set_delay(SPICE_PLAYBACK_CHANNEL(p->pchannel), GST_TIME_AS_MSECONDS(minlat));
     }
     gst_query_unref (q);
 
-- 
1.7.10.2



More information about the Spice-devel mailing list