diff --git a/ChangeLog b/ChangeLog index 9483ef1250..06cc8d1120 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-06 Wim Taymans + + * gst/playback/gstdecodebin.c: (gst_decode_bin_init), + (close_pad_link): + * gst/playback/gstplaybasebin.c: (new_decoded_pad_full): + Activate dynamic pads before adding them to the element. + 2006-10-06 Michael Smith * gst-libs/gst/floatcast/floatcast.h: diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index e4f1850c8c..55267b233b 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -323,7 +323,7 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) if (!decode_bin->typefind) { g_warning ("can't find typefind element, decodebin will not work"); } else { - GstPad *pad; + GstPad *pad, *gpad; /* add the typefind element */ if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) { @@ -336,8 +336,9 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gst_element_add_pad (GST_ELEMENT (decode_bin), - gst_ghost_pad_new ("sink", pad)); + gpad = gst_ghost_pad_new ("sink", pad); + gst_pad_set_active (gpad, TRUE); + gst_element_add_pad (GST_ELEMENT (decode_bin), gpad); gst_object_unref (pad); @@ -685,6 +686,7 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, /* make it a ghostpad */ ghost = gst_ghost_pad_new (padname, pad); + gst_pad_set_active (ghost, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); data = g_new0 (PadProbeData, 1); diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index d4a73a61f9..78a797e048 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -1194,7 +1194,9 @@ new_decoded_pad_full (GstElement * element, GstPad * pad, gboolean last, } /* add to stream selector */ - sinkpad = gst_element_get_pad (group->type[type - 1].selector, "sink%d"); + sinkpad = + gst_element_get_request_pad (group->type[type - 1].selector, "sink%d"); + /* make sure we catch unlink signals */ sig = g_signal_connect (G_OBJECT (sinkpad), "unlinked", G_CALLBACK (preroll_unlinked), play_base_bin); @@ -1203,6 +1205,7 @@ new_decoded_pad_full (GstElement * element, GstPad * pad, gboolean last, /* Store a pointer to the stream selector pad for this stream */ g_object_set_data (G_OBJECT (pad), "pb_sel_pad", sinkpad); + gst_pad_set_active (sinkpad, TRUE); gst_pad_link (pad, sinkpad); gst_object_unref (sinkpad);