mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
rtspsrc: flush connection when stopping
When we stop, we can flush all pending commands so that we can stop and join the task. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684924
This commit is contained in:
parent
96f8775a0d
commit
c8fb1c720c
1 changed files with 4 additions and 1 deletions
|
@ -285,6 +285,9 @@ static gboolean gst_rtspsrc_push_event (GstRTSPSrc * src, GstEvent * event);
|
||||||
#define CMD_RECONNECT (1 << 5)
|
#define CMD_RECONNECT (1 << 5)
|
||||||
#define CMD_LOOP (1 << 6)
|
#define CMD_LOOP (1 << 6)
|
||||||
|
|
||||||
|
/* mask for all commands */
|
||||||
|
#define CMD_ALL ((CMD_LOOP << 1) - 1)
|
||||||
|
|
||||||
#define GST_ELEMENT_PROGRESS(el, type, code, text) \
|
#define GST_ELEMENT_PROGRESS(el, type, code, text) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
gchar *__txt = _gst_element_error_printf text; \
|
gchar *__txt = _gst_element_error_printf text; \
|
||||||
|
@ -6699,7 +6702,7 @@ gst_rtspsrc_stop (GstRTSPSrc * src)
|
||||||
GST_DEBUG_OBJECT (src, "stopping");
|
GST_DEBUG_OBJECT (src, "stopping");
|
||||||
|
|
||||||
/* also cancels pending task */
|
/* also cancels pending task */
|
||||||
gst_rtspsrc_loop_send_cmd (src, CMD_WAIT, CMD_CLOSE);
|
gst_rtspsrc_loop_send_cmd (src, CMD_WAIT, CMD_ALL);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (src);
|
GST_OBJECT_LOCK (src);
|
||||||
if ((task = src->task)) {
|
if ((task = src->task)) {
|
||||||
|
|
Loading…
Reference in a new issue