mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
make sure gst_spider_plug isn't called while in playing state
Original commit message from CVS: make sure gst_spider_plug isn't called while in playing state
This commit is contained in:
parent
9546949ebf
commit
a02e75b8d4
1 changed files with 12 additions and 0 deletions
|
@ -471,7 +471,19 @@ gst_spider_identity_plug (GstSpiderIdentity *ident)
|
||||||
}
|
}
|
||||||
if ((GstElement *) conn->sink == conn->current)
|
if ((GstElement *) conn->sink == conn->current)
|
||||||
{
|
{
|
||||||
|
gboolean restart = FALSE;
|
||||||
|
/* check if restarting is necessary */
|
||||||
|
if (gst_element_get_state ((GstElement *) spider) == GST_STATE_PLAYING)
|
||||||
|
{
|
||||||
|
restart = TRUE;
|
||||||
|
gst_element_set_state ((GstElement *) spider, GST_STATE_PAUSED);
|
||||||
|
}
|
||||||
gst_spider_plug (conn);
|
gst_spider_plug (conn);
|
||||||
|
/* restart if needed */
|
||||||
|
if (restart)
|
||||||
|
{
|
||||||
|
gst_element_set_state ((GstElement *) spider, GST_STATE_PLAYING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue