summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-06-04 15:19:05 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-06-04 15:19:05 +0200
commitb9ddf22340b2d0c76bb0b77a4b8976ed339b1cd8 (patch)
treea22c5f393bdcbd53b0252c9658e9fcd02abede3c
parent44956f98d73053a2265cb196e08327cff013676e (diff)
rtspsrc: set the right state on rtpbin
We need to set the state of gstrtpbin to the same state as our source elements. This fixes fallback to TCP again.
-rw-r--r--gst/rtsp/gstrtspsrc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 82bbfd1d..210e142e 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1903,6 +1903,8 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
/* configure the manager */
if (src->session == NULL) {
+ GstState target;
+
if (!(src->session = gst_element_factory_make (manager, NULL))) {
/* fallback */
if (gst_rtsp_transport_get_manager (transport->trans, &manager, 1) < 0)
@@ -1918,7 +1920,11 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
/* we manage this element */
gst_bin_add (GST_BIN_CAST (src), src->session);
- ret = gst_element_set_state (src->session, GST_STATE_PAUSED);
+ GST_OBJECT_LOCK (src);
+ target = GST_STATE_TARGET (src);
+ GST_OBJECT_UNLOCK (src);
+
+ ret = gst_element_set_state (src->session, target);
if (ret == GST_STATE_CHANGE_FAILURE)
goto start_session_failure;