diff options
Diffstat (limited to 'gst/playback/gsturidecodebin3.c')
-rw-r--r-- | gst/playback/gsturidecodebin3.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gst/playback/gsturidecodebin3.c b/gst/playback/gsturidecodebin3.c index f8428dd4b..71edd310b 100644 --- a/gst/playback/gsturidecodebin3.c +++ b/gst/playback/gsturidecodebin3.c @@ -786,7 +786,27 @@ static void src_pad_removed_cb (GstElement * element, GstPad * pad, GstSourceHandler * handler) { - /* FIXME : IMPLEMENT */ + GstURIDecodeBin3 *uridecodebin = handler->uridecodebin; + GstPad *peer_pad = gst_pad_get_peer (pad); + + if (peer_pad) { + GstPadTemplate *templ = gst_pad_get_pad_template (peer_pad); + + GST_DEBUG_OBJECT (uridecodebin, + "Source %" GST_PTR_FORMAT " removed pad %" GST_PTR_FORMAT " peer %" + GST_PTR_FORMAT, element, pad, peer_pad); + + if (templ) { + if (GST_PAD_TEMPLATE_PRESENCE (templ) == GST_PAD_REQUEST) { + GST_DEBUG_OBJECT (uridecodebin, + "Releasing decodebin pad %" GST_PTR_FORMAT, peer_pad); + gst_element_release_request_pad (uridecodebin->decodebin, peer_pad); + } + gst_object_unref (templ); + } + + gst_object_unref (peer_pad); + } } static void |