From 6a2a4c0fe62d0cdbecc8dd0b01ea458c6efa2de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 17 Oct 2006 15:16:47 +0000 Subject: [PATCH] Activate pads before adding them to running element. 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. --- ChangeLog | 9 +++++++++ ext/wavpack/gstwavpackenc.c | 1 + ext/wavpack/gstwavpackparse.c | 1 + gst/nuvdemux/gstnuvdemux.c | 2 ++ tests/check/elements/wavpackparse.c | 1 + 5 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 49f66b3d91..88273d5f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-10-17 Tim-Philipp Müller + + * 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. + 2006-10-17 Tim-Philipp Müller Patch by: Josep Torra Valles diff --git a/ext/wavpack/gstwavpackenc.c b/ext/wavpack/gstwavpackenc.c index dbc3a31ccf..308f951c34 100644 --- a/ext/wavpack/gstwavpackenc.c +++ b/ext/wavpack/gstwavpackenc.c @@ -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) { diff --git a/ext/wavpack/gstwavpackparse.c b/ext/wavpack/gstwavpackparse.c index 30a5d78d84..62bb8efdcf 100644 --- a/ext/wavpack/gstwavpackparse.c +++ b/ext/wavpack/gstwavpackparse.c @@ -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)); diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c index 680990705c..eb3aba56c6 100644 --- a/gst/nuvdemux/gstnuvdemux.c +++ b/gst/nuvdemux/gstnuvdemux.c @@ -424,6 +424,7 @@ gst_nuv_demux_create_pads (GstNuvDemux * nuv) gst_pad_set_event_function (nuv->src_video_pad, gst_nuv_demux_handle_src_event); + gst_pad_set_active (nuv->src_video_pad, TRUE); gst_element_add_pad (GST_ELEMENT (nuv), nuv->src_video_pad); gst_caps_unref (video_caps); } @@ -443,6 +444,7 @@ gst_nuv_demux_create_pads (GstNuvDemux * nuv) gst_pad_use_fixed_caps (nuv->src_audio_pad); gst_pad_set_active (nuv->src_audio_pad, TRUE); gst_pad_set_caps (nuv->src_audio_pad, audio_caps); + gst_pad_set_active (nuv->src_audio_pad, TRUE); gst_element_add_pad (GST_ELEMENT (nuv), nuv->src_audio_pad); gst_pad_set_event_function (nuv->src_audio_pad, diff --git a/tests/check/elements/wavpackparse.c b/tests/check/elements/wavpackparse.c index fa0b137c12..80cef39907 100644 --- a/tests/check/elements/wavpackparse.c +++ b/tests/check/elements/wavpackparse.c @@ -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); }