getting assertion `GST_IS_PAD (pad)' failed on calling gst_element_remove_pad
Yogesh Tyagi
yogesh.bit2006 at gmail.com
Tue Nov 19 03:38:25 PST 2013
Hi,
I am getting following error when I am trying to play a media file with my
sample gstreamer player:
(im_gst_play:3723): GLib-GObject-WARNING **: invalid uninstantiatable type
`(null)' in cast to `GstPad'
(im_gst_play:3723): GStreamer-CRITICAL **: gst_element_remove_pad:
assertion `GST_IS_PAD (pad)' failed
I found that error was getting generated from "gst_element_remove_pad"
function call:
In my demux element I am using "gst_element_remove_pad" in following way in
finalize method of demux element:
im_gst_element_unregister_sinkpad (im_element, im_element->sink_pad);
if (!gst_element_remove_pad(GST_ELEMENT_CAST(demux),
GST_PAD(im_element->sink_pad)))
{
GST_ERROR_OBJECT (demux, "Error removing pad");
}
implementation of function "im_gst_element_unregister_sinkpad " is given
below:
gboolean im_gst_element_unregister_sinkpad (ImGstElement * im_element,
ImGstPad * pad)
{
ImGstElementSinkPad *pad_node_data = NULL;
g_mutex_lock (im_element->pad_list_mutex);
pad_node_data = im_gst_element_get_sink_pad_nodedata(im_element, pad);
g_static_rec_mutex_free (pad_node_data->adapter_lock);
g_free (pad_node_data->adapter_lock);
pad_node_data->adapter_lock = NULL;
gst_adapter_clear(pad_node_data->adapter);
g_object_unref(pad_node_data->adapter);
pad_node_data->adapter = NULL;
im_element->sink_pads = g_list_remove (im_element->sink_pads,
(gconstpointer) pad_node_data);
g_free(pad_node_data);
g_mutex_unlock (im_element->pad_list_mutex);
return TRUE;
}
Can somebody help me to find out why this assertion is getting generated?
Thanks,
Yogesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131119/54f33101/attachment-0001.html>
More information about the gstreamer-devel
mailing list