mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
pipeline: Do not relink an already linked track
This commit is contained in:
parent
08af3721bf
commit
e36c4c2bf7
1 changed files with 9 additions and 2 deletions
|
@ -201,13 +201,15 @@ ges_pipeline_set_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_timeline_track_added_cb (GESTimeline *timeline, GESTrack *track, GESPipeline *pipeline)
|
_timeline_track_added_cb (GESTimeline * timeline, GESTrack * track,
|
||||||
|
GESPipeline * pipeline)
|
||||||
{
|
{
|
||||||
_link_track (pipeline, track);
|
_link_track (pipeline, track);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_timeline_track_removed_cb (GESTimeline *timeline, GESTrack *track, GESPipeline *pipeline)
|
_timeline_track_removed_cb (GESTimeline * timeline, GESTrack * track,
|
||||||
|
GESPipeline * pipeline)
|
||||||
{
|
{
|
||||||
_unlink_track (pipeline, track);
|
_unlink_track (pipeline, track);
|
||||||
}
|
}
|
||||||
|
@ -667,10 +669,15 @@ _link_track (GESPipeline * self, GESTrack * track)
|
||||||
/* Get an existing chain or create it */
|
/* Get an existing chain or create it */
|
||||||
if (!(chain = get_output_chain_for_track (self, track)))
|
if (!(chain = get_output_chain_for_track (self, track)))
|
||||||
chain = new_output_chain_for_track (self, track);
|
chain = new_output_chain_for_track (self, track);
|
||||||
|
|
||||||
|
if (chain->tee)
|
||||||
|
return;
|
||||||
|
|
||||||
chain->srcpad = pad;
|
chain->srcpad = pad;
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
|
|
||||||
/* Adding tee */
|
/* Adding tee */
|
||||||
|
|
||||||
if (!chain->tee) {
|
if (!chain->tee) {
|
||||||
chain->tee = gst_element_factory_make ("tee", NULL);
|
chain->tee = gst_element_factory_make ("tee", NULL);
|
||||||
gst_bin_add (GST_BIN_CAST (self), chain->tee);
|
gst_bin_add (GST_BIN_CAST (self), chain->tee);
|
||||||
|
|
Loading…
Reference in a new issue