Commit 8480b1ef authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

uridecodebin: remove some dead code

... which was dead as pads were never added to the list, and need not be added,
since removing them is handled by a pad callback.
parent 3c3a78f3
......@@ -91,7 +91,6 @@ struct _GstURIDecodeBin
guint have_type_id; /* have-type signal id from typefind */
GSList *decodebins;
GSList *pending_decodebins;
GSList *srcpads;
gint numpads;
/* for dynamic sources */
......@@ -1424,22 +1423,6 @@ remove_decoders (GstURIDecodeBin * bin, gboolean force)
GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_IS_SOURCE);
}
static void
remove_pads (GstURIDecodeBin * bin)
{
GSList *walk;
for (walk = bin->srcpads; walk; walk = g_slist_next (walk)) {
GstPad *pad = GST_PAD_CAST (walk->data);
GST_DEBUG_OBJECT (bin, "removing old pad");
gst_pad_set_active (pad, FALSE);
gst_element_remove_pad (GST_ELEMENT_CAST (bin), pad);
}
g_slist_free (bin->srcpads);
bin->srcpads = NULL;
}
static void
proxy_unknown_type_signal (GstElement * element, GstPad * pad, GstCaps * caps,
GstURIDecodeBin * dec)
......@@ -2403,14 +2386,12 @@ gst_uri_decode_bin_change_state (GstElement * element,
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_DEBUG ("paused to ready");
remove_decoders (decoder, FALSE);
remove_pads (decoder);
remove_source (decoder);
do_async_done (decoder);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
GST_DEBUG ("ready to null");
remove_decoders (decoder, TRUE);
remove_pads (decoder);
remove_source (decoder);
break;
default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment