mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
webrtcrenego: Fix incorrect release of non-request pad
GStreamer-CRITICAL **: 16:39:23.230: gst_element_release_request_pad: assertion 'GST_PAD_PAD_TEMPLATE (pad) == NULL || GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) == GST_PAD_REQUEST' failed Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
This commit is contained in:
parent
fb406b7a56
commit
76b5178260
1 changed files with 1 additions and 3 deletions
|
@ -16,7 +16,7 @@ _element_message (GstElement * parent, GstMessage * msg)
|
||||||
{
|
{
|
||||||
switch (GST_MESSAGE_TYPE (msg)) {
|
switch (GST_MESSAGE_TYPE (msg)) {
|
||||||
case GST_MESSAGE_EOS:{
|
case GST_MESSAGE_EOS:{
|
||||||
GstElement *receive, *webrtc;
|
GstElement *receive;
|
||||||
GstPad *pad, *peer;
|
GstPad *pad, *peer;
|
||||||
|
|
||||||
g_print ("Got element EOS message from %s parent %s\n",
|
g_print ("Got element EOS message from %s parent %s\n",
|
||||||
|
@ -27,11 +27,9 @@ _element_message (GstElement * parent, GstMessage * msg)
|
||||||
pad = gst_element_get_static_pad (receive, "sink");
|
pad = gst_element_get_static_pad (receive, "sink");
|
||||||
peer = gst_pad_get_peer (pad);
|
peer = gst_pad_get_peer (pad);
|
||||||
|
|
||||||
webrtc = GST_ELEMENT (gst_pad_get_parent (peer));
|
|
||||||
gst_bin_remove (GST_BIN (pipe1), receive);
|
gst_bin_remove (GST_BIN (pipe1), receive);
|
||||||
|
|
||||||
gst_pad_unlink (peer, pad);
|
gst_pad_unlink (peer, pad);
|
||||||
gst_element_release_request_pad (webrtc, peer);
|
|
||||||
|
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
|
|
Loading…
Reference in a new issue