[Spice-commits] src/spice-gstaudio.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 7 14:31:51 UTC 2018


 src/spice-gstaudio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e5ece54aca21ae7c4475a8cfebc74d40b6aea44a
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Jun 7 16:10:58 2018 +0200

    gstaudio: specify the segment format to be time-based
    
    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>
    Acked-by: Victor Toso <victortoso at redhat.com>

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);


More information about the Spice-commits mailing list