After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686723 - basesrc: generic/states test in -base now hangs with appsrc
basesrc: generic/states test in -base now hangs with appsrc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 1.0.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 686273 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-23 19:55 UTC by Tim-Philipp Müller
Modified: 2012-10-25 07:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2012-10-23 19:55:14 UTC
The -base generic/states test now hangs for appsrc.

I suspect this change may have caused this:


commit f688d4d8a769f064b500014d39a820653a48b9e8
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Oct 9 15:31:19 2012 +0200

    basesrc: retrieve the result from start_complete
    
    gst_base_src_start_complete() can fail when the thread could not be
    started, for example. Make sure it causes the state change to fail by
    retrieving the result from _start_complete().

diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c
index fef9b25..679a33d 100644
--- a/libs/gst/base/gstbasesrc.c
+++ b/libs/gst/base/gstbasesrc.c
@@ -3115,8 +3115,12 @@ gst_base_src_start (GstBaseSrc * basesrc)
   if (!result)
     goto could_not_start;
 
-  if (!gst_base_src_is_async (basesrc))
+  if (!gst_base_src_is_async (basesrc)) {
     gst_base_src_start_complete (basesrc, GST_FLOW_OK);
+    /* not really waiting here, we call this to get the result
+     * from the start_complete call */
+    result = gst_base_src_start_wait (basesrc) == GST_FLOW_OK;
+  }
 
   return result;
Comment 1 Wim Taymans 2012-10-24 09:24:08 UTC
commit 9f42bd643e3b8ba3dd0da1654abef4fd2615e34e
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Oct 24 11:16:12 2012 +0200

    basesrc: use new GCond for async state change
    
    Use a new GCond, protected with the object lock, to signal completion
    of the async state change. We can't reuse the live lock because that
    one can be locked when the create function blocks.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686723
Comment 2 Wim Taymans 2012-10-25 07:14:15 UTC
*** Bug 686273 has been marked as a duplicate of this bug. ***