hlsdemux: set the pad's caps before adding it
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Tue, 2 Aug 2011 19:21:18 +0000 (19:21 +0000)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 18 Aug 2011 11:53:02 +0000 (13:53 +0200)
gst/hls/gsthlsdemux.c

index 773d24986a5eb9fb98d21246363b0419fdc7375a..b3a86a5f17b22f450a7c07c3b252294cb05622ca 100644 (file)
@@ -570,8 +570,8 @@ switch_pads (GstHLSDemux * demux, GstCaps * newcaps)
       GST_DEBUG_FUNCPTR (gst_hls_demux_src_query));
   gst_pad_set_element_private (demux->srcpad, demux);
   gst_pad_set_active (demux->srcpad, TRUE);
-  gst_element_add_pad (GST_ELEMENT (demux), demux->srcpad);
   gst_pad_set_caps (demux->srcpad, newcaps);
+  gst_element_add_pad (GST_ELEMENT (demux), demux->srcpad);
 
   gst_element_no_more_pads (GST_ELEMENT (demux));