summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-03-10 15:46:40 +1100
committerJan Schmidt <jan@centricular.com>2015-03-10 15:49:33 +1100
commitd441140cd648e835d91855c21a46b655c0ae4991 (patch)
tree4d07cfffd776e722b0b2324fa99e5b8b363fa39d /gst
parentb528c527b75ac466a192ddc1cb9e874a09e9b86b (diff)
splitmux: Shut down element before downward state change
Make sure the state change won't hang trying to shut down pads by making sure the streaming has stopped before chaining up.
Diffstat (limited to 'gst')
-rw-r--r--gst/multifile/gstsplitmuxsrc.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c
index 61f0c0642..ea3ea7579 100644
--- a/gst/multifile/gstsplitmuxsrc.c
+++ b/gst/multifile/gstsplitmuxsrc.c
@@ -309,17 +309,7 @@ gst_splitmux_src_change_state (GstElement * element, GstStateChange transition)
}
case GST_STATE_CHANGE_PAUSED_TO_READY:
case GST_STATE_CHANGE_READY_TO_NULL:
- break;
- default:
- break;
- }
-
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
- if (ret == GST_STATE_CHANGE_FAILURE)
- goto beach;
-
- switch (transition) {
- case GST_STATE_CHANGE_READY_TO_NULL:
+ /* Make sure the element will shut down */
if (!gst_splitmux_src_stop (splitmux))
return GST_STATE_CHANGE_FAILURE;
break;
@@ -327,7 +317,8 @@ gst_splitmux_src_change_state (GstElement * element, GstStateChange transition)
break;
}
-beach:
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
return ret;
}