[gstreamer-bugs] [Bug 545807] [baseaudiosink] audible crack when starting the pipeline

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun May 3 22:40:35 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=545807

  GStreamer | gst-plugins-base | Ver: git




------- Comment #20 from Eero Nurkkala  2009-05-04 05:40 UTC -------
(In reply to comment #19)
> Could we talk about this a bit:
> 
> <------------------------------------------>
> --- a/gst-libs/gst/audio/gstringbuffer.c
> +++ b/gst-libs/gst/audio/gstringbuffer.c
> @@ -1398,6 +1398,10 @@ wait_segment (GstRingBuffer * buf)
>      gst_ring_buffer_start (buf);
>    }
> 
> +  /* After starting, the writer may have wrote segments already */
> +  if (g_atomic_int_get (&buf->segdone) > 0)
> +    goto no_need_to_wait;
> +
>    /* take lock first, then update our waiting flag */
>    GST_OBJECT_LOCK (buf);
>    if (G_UNLIKELY (buf->abidata.ABI.flushing))
> @@ -1420,6 +1424,7 @@ wait_segment (GstRingBuffer * buf)
>    }
>    GST_OBJECT_UNLOCK (buf);
> 
> +no_need_to_wait:
>    return TRUE;
> <------------------------------------------> 
> 


Should look like:

<--------------------------------------->
--- a/gst-libs/gst/audio/gstringbuffer.c
+++ b/gst-libs/gst/audio/gstringbuffer.c
@@ -1390,6 +1390,10 @@

     GST_DEBUG_OBJECT (buf, "start!");
     gst_ring_buffer_start (buf);
+
+   /* After starting, the writer may have wrote segments already */
+   if (g_atomic_int_get (&buf->segdone) > 0)
+     goto no_need_to_wait;
   }

   /* take lock first, then update our waiting flag */
@@ -1414,6 +1418,7 @@
   }
   GST_OBJECT_UNLOCK (buf);

+no_need_to_wait:
   return TRUE;

   /* ERROR */
<------------------------------->


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=545807.




More information about the Gstreamer-bugs mailing list