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 693401 - gstdecodebin2 doesn't set send event on pad before exposing pad
gstdecodebin2 doesn't set send event on pad before exposing pad
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-08 07:35 UTC by Alexander Schrab
Modified: 2013-02-14 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Manually push the caps event to the ghost pad before blocking on it. (1.94 KB, patch)
2013-02-08 07:47 UTC, Alexander Schrab
committed Details | Review
Patch to not block on caps event (1.30 KB, patch)
2013-02-13 23:55 UTC, Matej Knopp
needs-work Details | Review
Check if value is set (762 bytes, patch)
2013-02-14 10:19 UTC, Matej Knopp
committed Details | Review
Fix previous patch (819 bytes, patch)
2013-02-14 10:25 UTC, Matej Knopp
none Details | Review
Patch to not block on caps event (1.09 KB, patch)
2013-02-14 10:32 UTC, Matej Knopp
rejected Details | Review
decodebin: don't block on caps (891 bytes, patch)
2013-02-14 10:38 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Alexander Schrab 2013-02-08 07:35:16 UTC
When decodebin finally adds it's ghost pads to the bin element it sometimes does so before sending the caps event to the ghost pad. This results in a signal pad-added with a pad that doesn't have a gst_pad_current_caps, which causes other problems.
Comment 1 Alexander Schrab 2013-02-08 07:47:57 UTC
Created attachment 235487 [details] [review]
Manually push the caps event to the ghost pad before blocking on it.
Comment 2 Sebastian Dröge (slomo) 2013-02-12 09:13:16 UTC
commit e7caef6b29c5d698f12402022e88c608cd920e4f
Author: Alexander Schrab <alexas@axis.com>
Date:   Fri Feb 8 08:46:25 2013 +0100

    decodebin: Push caps event immediately to ghost pad to avoid exposing pads without caps
Comment 3 Matej Knopp 2013-02-13 23:53:47 UTC
The patch breaks #674043
Caps event blocks probe and mp4 demuxer locks up on allocation probe.
Comment 4 Matej Knopp 2013-02-13 23:55:22 UTC
Created attachment 235968 [details] [review]
Patch to not block on caps event
Comment 5 Alexander Schrab 2013-02-14 07:42:47 UTC
Matej: Try to bring back this part of the original code instead:

3916 /* If we unblocked due to a caps event, let it go through */		
3917	  if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) &&		
3918	      (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) == GST_EVENT_CAPS))		
3919	    return GST_PAD_PROBE_PASS;
Comment 6 Sebastian Dröge (slomo) 2013-02-14 09:04:34 UTC
Review of attachment 235968 [details] [review]:

::: gst/playback/gstdecodebin2.c
@@ +3132,3 @@
 beach:
+  if (G_IS_VALUE (&item))
+    g_value_unset (&item);

Why this?

@@ +3898,3 @@
       gst_pad_push_event (GST_PAD_CAST (dpad),
           gst_event_ref (GST_PAD_PROBE_INFO_EVENT (info)));
+      return GST_PAD_PROBE_PASS;

Yes, just re-add the old code that was removed by the old patch
Comment 7 Matej Knopp 2013-02-14 10:19:36 UTC
Created attachment 236026 [details] [review]
Check if value is set

When decodebin can't link demuxer and multiqueue it later tries tries to unset value that hasn't been set (which results in glib warning)
Comment 8 Sebastian Dröge (slomo) 2013-02-14 10:23:10 UTC
Comment on attachment 236026 [details] [review]
Check if value is set

commit 872cc295a6f48eac9bff65bdd484209a6c1d93af
Author: Matej Knopp <matej.knopp@gmail.com>
Date:   Thu Feb 14 11:17:31 2013 +0100

    decodebin: Check if value is set before unsetting it
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693401
Comment 9 Matej Knopp 2013-02-14 10:25:40 UTC
Created attachment 236027 [details] [review]
Fix previous patch
Comment 10 Matej Knopp 2013-02-14 10:32:15 UTC
Created attachment 236031 [details] [review]
Patch to not block on caps event
Comment 11 Sebastian Dröge (slomo) 2013-02-14 10:38:27 UTC
Created attachment 236032 [details] [review]
decodebin: don't block on caps
Comment 12 Sebastian Dröge (slomo) 2013-02-14 10:40:12 UTC
Comment on attachment 236031 [details] [review]
Patch to not block on caps event

This would return too early without exposing pads
Comment 13 Sebastian Dröge (slomo) 2013-02-14 10:40:31 UTC
commit 1e5b50e94c3938c2fb339bd53f99b68c9e94b3be
Author: Matej Knopp <matej.knopp@gmail.com>
Date:   Thu Feb 14 00:54:34 2013 +0100

    decodebin: don't block on caps