rtspsrc: remove some obsolete code
It is not needed to do a state change from the _play() function on ourselves. The state change function already did that and we don't want to interfere with that (or use hacks to avoid interference).
This commit is contained in:
parent
e6f850996b
commit
4fc1f3088b
@ -6388,28 +6388,6 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async)
|
|||||||
* udp sources */
|
* udp sources */
|
||||||
gst_rtspsrc_send_dummy_packets (src);
|
gst_rtspsrc_send_dummy_packets (src);
|
||||||
|
|
||||||
/* activate receive elements;
|
|
||||||
* only in async case, since receive elements may not have been affected
|
|
||||||
* by overall state change (e.g. not around yet),
|
|
||||||
* do not mess with state in sync case (e.g. seeking) */
|
|
||||||
if (async) {
|
|
||||||
/* state change might be happening in the application thread. A
|
|
||||||
* specific case is when chaging state to NULL where we will wait
|
|
||||||
* for this task to finish (gst_rtspsrc_stop). However this task
|
|
||||||
* will try to change the state to PLAYING causing a deadlock. */
|
|
||||||
|
|
||||||
/* make sure we are not in the middle of a state change. The
|
|
||||||
* state lock is a recursive lock so it's safe to lock twice from
|
|
||||||
* the same thread */
|
|
||||||
if (GST_STATE_TRYLOCK (src)) {
|
|
||||||
gst_element_set_state (GST_ELEMENT_CAST (src), GST_STATE_PLAYING);
|
|
||||||
GST_STATE_UNLOCK (src);
|
|
||||||
} else {
|
|
||||||
res = GST_RTSP_ERROR;
|
|
||||||
goto changing_state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* construct a control url */
|
/* construct a control url */
|
||||||
if (src->control)
|
if (src->control)
|
||||||
control = src->control;
|
control = src->control;
|
||||||
@ -6571,11 +6549,6 @@ was_playing:
|
|||||||
GST_DEBUG_OBJECT (src, "we were already PLAYING");
|
GST_DEBUG_OBJECT (src, "we were already PLAYING");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
changing_state:
|
|
||||||
{
|
|
||||||
GST_DEBUG_OBJECT (src, "failed going to PLAYING, already changing state");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
create_request_failed:
|
create_request_failed:
|
||||||
{
|
{
|
||||||
gchar *str = gst_rtsp_strresult (res);
|
gchar *str = gst_rtsp_strresult (res);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user