mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
switchsrc: Set the GST_ELEMENT_IS_SOURCE flag
This commit is contained in:
parent
2833cc4375
commit
d7d28ea4db
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,8 @@ gst_switch_src_init (GstSwitchSrc * src, GstSwitchSrcClass * g_class)
|
||||||
gst_element_add_pad (GST_ELEMENT (src), src->pad);
|
gst_element_add_pad (GST_ELEMENT (src), src->pad);
|
||||||
|
|
||||||
gst_switch_src_reset (src);
|
gst_switch_src_reset (src);
|
||||||
|
|
||||||
|
GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -191,6 +193,8 @@ gst_switch_src_commit_new_kid (GstSwitchSrc * src)
|
||||||
gst_element_set_state (old_kid, GST_STATE_NULL);
|
gst_element_set_state (old_kid, GST_STATE_NULL);
|
||||||
gst_bin_remove (GST_BIN (src), old_kid);
|
gst_bin_remove (GST_BIN (src), old_kid);
|
||||||
gst_object_unref (old_kid);
|
gst_object_unref (old_kid);
|
||||||
|
/* Don't lose the SOURCE flag */
|
||||||
|
GST_OBJECT_FLAG_SET (src, GST_ELEMENT_IS_SOURCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
|
|
Loading…
Reference in a new issue