icydemux: activate srcpad before setting caps
authorAnton Novikov <random.plant@gmail.com>
Tue, 22 May 2012 08:35:29 +0000 (12:35 +0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 23 May 2012 08:04:09 +0000 (10:04 +0200)
Before gst_pad_set_active() is called, the pad has
FLUSHING flag set, so setting the caps fails

gst/icydemux/gsticydemux.c

index 4970745..d92de7c 100644 (file)
@@ -231,6 +231,7 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
     g_return_val_if_fail (icydemux->srcpad != NULL, FALSE);
 
     gst_pad_use_fixed_caps (icydemux->srcpad);
+    gst_pad_set_active (icydemux->srcpad, TRUE);
 
     if (icydemux->src_caps)
       gst_pad_set_caps (icydemux->srcpad, icydemux->src_caps);
@@ -238,7 +239,6 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
     GST_DEBUG_OBJECT (icydemux, "Adding src pad with caps %" GST_PTR_FORMAT,
         icydemux->src_caps);
 
-    gst_pad_set_active (icydemux->srcpad, TRUE);
     if (!(gst_element_add_pad (GST_ELEMENT (icydemux), icydemux->srcpad)))
       return FALSE;
     gst_element_no_more_pads (GST_ELEMENT (icydemux));