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:
Steve Baker 2002-06-07 19:37:00 +00:00
parent 9546949ebf
commit a02e75b8d4

View file

@ -471,7 +471,19 @@ gst_spider_identity_plug (GstSpiderIdentity *ident)
}
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);
/* restart if needed */
if (restart)
{
gst_element_set_state ((GstElement *) spider, GST_STATE_PLAYING);
}
}
}
}