mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
[MOVED FROM GST-P-FARSIGHT] Activate pads before adding them in case we're already playing
20080403020318-3e2dc-afd58f992c0b3057221b91034b2fcd91f296e52d.gz
This commit is contained in:
parent
5a48de94d7
commit
3a53d39191
1 changed files with 12 additions and 0 deletions
|
@ -1234,6 +1234,10 @@ gst_live_adder_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
|||
|
||||
gst_pad_set_chain_function (newpad, gst_live_live_adder_chain);
|
||||
|
||||
|
||||
if (!gst_pad_set_active (newpad, TRUE))
|
||||
goto could_not_activate;
|
||||
|
||||
/* takes ownership of the pad */
|
||||
if (!gst_element_add_pad (GST_ELEMENT (adder), newpad))
|
||||
goto could_not_add;
|
||||
|
@ -1253,6 +1257,14 @@ not_sink:
|
|||
could_not_add:
|
||||
{
|
||||
GST_DEBUG_OBJECT (adder, "could not add pad");
|
||||
g_free (padprivate);
|
||||
gst_object_unref (newpad);
|
||||
return NULL;
|
||||
}
|
||||
could_not_activate:
|
||||
{
|
||||
GST_DEBUG_OBJECT (adder, "could not activate new pad");
|
||||
g_free (padprivate);
|
||||
gst_object_unref (newpad);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue