[Spice-devel] [PATCH spice-gtk] gstaudio: specify the segment format to be time-based

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Thu Jun 7 14:12:45 UTC 2018


From: Marc-André Lureau <marcandre.lureau at redhat.com>

With gstreamer audio backend, the following criticals are printed:
(virt-viewer:27631): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed

Because the default appsrc segment format is byte-based, although an
audio sink want a time-based segment.

Fixes:
https://gitlab.freedesktop.org/spice/spice-gtk/issues/39

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 src/spice-gstaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
index 97546b6..910ba93 100644
--- a/src/spice-gstaudio.c
+++ b/src/spice-gstaudio.c
@@ -305,7 +305,7 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan
                             "layout=interleaved", channels, frequency);
         gchar *pipeline = g_strdup (g_getenv("SPICE_GST_AUDIOSINK"));
         if (pipeline == NULL)
-            pipeline = g_strdup_printf("appsrc is-live=1 do-timestamp=0 caps=\"%s\" name=\"appsrc\" ! queue ! "
+            pipeline = g_strdup_printf("appsrc is-live=1 do-timestamp=0 format=time caps=\"%s\" name=\"appsrc\" ! queue ! "
                                        "audioconvert ! audioresample ! autoaudiosink name=\"audiosink\"", audio_caps);
         SPICE_DEBUG("audio pipeline: %s", pipeline);
         p->playback.pipe = gst_parse_launch(pipeline, &error);

base-commit: 7b67ed4eb6ab530bf58afac8ff4ed190cc951dfb
-- 
2.18.0.rc1.1.gae296d1cf5



More information about the Spice-devel mailing list