Activate pads before adding them to running element.
authorTim-Philipp Müller <tim@centricular.net>
Tue, 17 Oct 2006 15:16:47 +0000 (15:16 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 17 Oct 2006 15:16:47 +0000 (15:16 +0000)
Original commit message from CVS:
* ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_set_wp_config):
* ext/wavpack/gstwavpackparse.c:
(gst_wavpack_parse_create_src_pad):
* gst/nuvdemux/gstnuvdemux.c: (gst_nuv_demux_create_pads):
* tests/check/elements/wavpackparse.c: (wavpackparse_found_pad):
Activate pads before adding them to running element.

ext/wavpack/gstwavpackenc.c
ext/wavpack/gstwavpackparse.c
tests/check/elements/wavpackparse.c

index dbc3a31..308f951 100644 (file)
@@ -442,6 +442,7 @@ gst_wavpack_enc_set_wp_config (GstWavpackEnc * enc)
         GST_WARNING_OBJECT (enc, "setting correction caps failed");
       } else {
         gst_pad_use_fixed_caps (enc->wvcsrcpad);
+        gst_pad_set_active (enc->wvcsrcpad, TRUE);
         gst_element_add_pad (GST_ELEMENT (enc), enc->wvcsrcpad);
         enc->wp_config->flags |= CONFIG_CREATE_WVC;
         if (enc->correction_mode == 2) {
index 30a5d78..62bb8ef 100644 (file)
@@ -831,6 +831,7 @@ gst_wavpack_parse_create_src_pad (GstWavpackParse * wvparse, GstBuffer * buf,
   gst_pad_use_fixed_caps (wvparse->srcpad);
 
   gst_object_ref (wvparse->srcpad);
+  gst_pad_set_active (wvparse->srcpad, TRUE);
   gst_element_add_pad (GST_ELEMENT (wvparse), wvparse->srcpad);
   gst_element_no_more_pads (GST_ELEMENT (wvparse));
 
index fa0b137..80cef39 100644 (file)
@@ -77,6 +77,7 @@ wavpackparse_found_pad (GstElement * src, GstPad * pad, gpointer data)
   gst_pad_set_chain_function (mysinkpad, gst_check_chain_func);
   fail_unless (gst_pad_link (srcpad, mysinkpad) == GST_PAD_LINK_OK,
       "Failed to link pads");
+  gst_pad_set_active (mysinkpad, TRUE);
   gst_object_unref (srcpad);
 }