mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
rtspsrc: ensure some initial state variable setup
... which might otherwise be skipped if the PLAY command is issued before the OPEN command had a chance to actually be acted upon. Fixes #657376.
This commit is contained in:
parent
ef1ad78eee
commit
95b5ece2c9
1 changed files with 7 additions and 4 deletions
|
@ -4105,6 +4105,8 @@ gst_rtspsrc_loop_send_cmd (GstRTSPSrc * src, gint cmd, gboolean flush)
|
||||||
/* start new request */
|
/* start new request */
|
||||||
gst_rtspsrc_loop_start_cmd (src, cmd);
|
gst_rtspsrc_loop_start_cmd (src, cmd);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "sending cmd %d", cmd);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (src);
|
GST_OBJECT_LOCK (src);
|
||||||
old = src->loop_cmd;
|
old = src->loop_cmd;
|
||||||
if (old != CMD_WAIT) {
|
if (old != CMD_WAIT) {
|
||||||
|
@ -6454,10 +6456,6 @@ gst_rtspsrc_thread (GstRTSPSrc * src)
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case CMD_OPEN:
|
case CMD_OPEN:
|
||||||
src->cur_protocols = src->protocols;
|
|
||||||
/* first attempt, don't ignore timeouts */
|
|
||||||
src->ignore_timeout = FALSE;
|
|
||||||
src->open_error = FALSE;
|
|
||||||
ret = gst_rtspsrc_open (src, TRUE);
|
ret = gst_rtspsrc_open (src, TRUE);
|
||||||
break;
|
break;
|
||||||
case CMD_PLAY:
|
case CMD_PLAY:
|
||||||
|
@ -6577,6 +6575,11 @@ gst_rtspsrc_change_state (GstElement * element, GstStateChange transition)
|
||||||
goto start_failed;
|
goto start_failed;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
|
/* init some state */
|
||||||
|
rtspsrc->cur_protocols = rtspsrc->protocols;
|
||||||
|
/* first attempt, don't ignore timeouts */
|
||||||
|
rtspsrc->ignore_timeout = FALSE;
|
||||||
|
rtspsrc->open_error = FALSE;
|
||||||
gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_OPEN, FALSE);
|
gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_OPEN, FALSE);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
|
|
Loading…
Reference in a new issue