GNOME Bugzilla – Bug 693401
gstdecodebin2 doesn't set send event on pad before exposing pad
Last modified: 2013-02-14 10:40:34 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.
Created attachment 235487 [details] [review] Manually push the caps event to the ghost pad before blocking on it.
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
The patch breaks #674043 Caps event blocks probe and mp4 demuxer locks up on allocation probe.
Created attachment 235968 [details] [review] Patch to not block on caps event
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;
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
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 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
Created attachment 236027 [details] [review] Fix previous patch
Created attachment 236031 [details] [review] Patch to not block on caps event
Created attachment 236032 [details] [review] decodebin: don't block on caps
Comment on attachment 236031 [details] [review] Patch to not block on caps event This would return too early without exposing pads
commit 1e5b50e94c3938c2fb339bd53f99b68c9e94b3be Author: Matej Knopp <matej.knopp@gmail.com> Date: Thu Feb 14 00:54:34 2013 +0100 decodebin: don't block on caps