summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 13:10:33 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2013-02-06 13:10:33 +0100
commitc3337b28d1ee65e7a321157faa00747dcbb19b81 (patch)
treeac1dfc987160b711595dcb1ed4ca88a40897e44b
parent83adc3740e2985368980cb58a46c3ab28cc20264 (diff)
rtspsrc: always flush connection in stop
Use the flush argument in the send_cmd method to force a flush of the connection. We only want to flush the connection when stopping so that we can stop and join the task. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684924
-rw-r--r--gst/rtsp/gstrtspsrc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 3db2d6905..c3d719def 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1765,7 +1765,7 @@ gst_rtspsrc_flush (GstRTSPSrc * src, gboolean flush, gboolean playing)
}
}
gst_rtspsrc_push_event (src, event, FALSE);
- gst_rtspsrc_loop_send_cmd (src, cmd, flush);
+ gst_rtspsrc_loop_send_cmd (src, cmd, FALSE);
/* set up manager before data-flow resumes */
/* to manage jitterbuffer buffer mode */
@@ -4184,8 +4184,6 @@ gst_rtspsrc_loop_send_cmd (GstRTSPSrc * src, gint cmd, gboolean flush)
{
gint old;
- /* FIXME flush param mute; remove at discretion */
-
/* start new request */
gst_rtspsrc_loop_start_cmd (src, cmd);
@@ -4202,7 +4200,7 @@ gst_rtspsrc_loop_send_cmd (GstRTSPSrc * src, gint cmd, gboolean flush)
}
src->loop_cmd = cmd;
/* interrupt if allowed */
- if (src->waiting) {
+ if (src->waiting || flush) {
GST_DEBUG_OBJECT (src, "start connection flush");
gst_rtspsrc_connection_flush (src, TRUE);
}
@@ -6534,7 +6532,7 @@ gst_rtspsrc_handle_message (GstBin * bin, GstMessage * message)
/* we only act on the first udp timeout message, others are irrelevant
* and can be ignored. */
if (!ignore_timeout)
- gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_RECONNECT, TRUE);
+ gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_RECONNECT, FALSE);
/* eat and free */
gst_message_unref (message);
return;
@@ -6738,7 +6736,7 @@ gst_rtspsrc_change_state (GstElement * element, GstStateChange transition)
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
/* unblock the tcp tasks and make the loop waiting */
- gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_WAIT, TRUE);
+ gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_WAIT, FALSE);
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
break;