mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
festival: Only close the connection if it's opened
This commit is contained in:
parent
41bba48ccb
commit
f09a8893c1
1 changed files with 3 additions and 2 deletions
|
@ -490,9 +490,10 @@ gst_festival_change_state (GstElement * element, GstStateChange transition)
|
||||||
g_return_val_if_fail (GST_IS_FESTIVAL (element), GST_STATE_CHANGE_FAILURE);
|
g_return_val_if_fail (GST_IS_FESTIVAL (element), GST_STATE_CHANGE_FAILURE);
|
||||||
|
|
||||||
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
|
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
|
||||||
if (GST_OBJECT_FLAG_IS_SET (element, GST_FESTIVAL_OPEN))
|
if (GST_OBJECT_FLAG_IS_SET (element, GST_FESTIVAL_OPEN)) {
|
||||||
GST_DEBUG ("Closing connection ");
|
GST_DEBUG ("Closing connection ");
|
||||||
gst_festival_close (GST_FESTIVAL (element));
|
gst_festival_close (GST_FESTIVAL (element));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!GST_OBJECT_FLAG_IS_SET (element, GST_FESTIVAL_OPEN)) {
|
if (!GST_OBJECT_FLAG_IS_SET (element, GST_FESTIVAL_OPEN)) {
|
||||||
GST_DEBUG ("Opening connection ");
|
GST_DEBUG ("Opening connection ");
|
||||||
|
|
Loading…
Reference in a new issue