mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
dtls: Let sender know when we are flushing
Prevents endless loop during shutdown where we end up sending 0 bytes. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2229>
This commit is contained in:
parent
8b8428aec2
commit
20ca07d174
1 changed files with 5 additions and 0 deletions
|
@ -565,6 +565,9 @@ sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE, (NULL), ("%s", err->message));
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE, (NULL), ("%s", err->message));
|
||||||
g_clear_error (&err);
|
g_clear_error (&err);
|
||||||
break;
|
break;
|
||||||
|
case GST_FLOW_FLUSHING:
|
||||||
|
GST_INFO_OBJECT (self, "Flushing");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
@ -680,6 +683,8 @@ on_send_data (GstDtlsConnection * connection, gconstpointer data, gsize length,
|
||||||
GST_TRACE_OBJECT (self, "send data: releasing lock");
|
GST_TRACE_OBJECT (self, "send data: releasing lock");
|
||||||
|
|
||||||
ret = self->src_ret == GST_FLOW_OK;
|
ret = self->src_ret == GST_FLOW_OK;
|
||||||
|
if (self->src_ret == GST_FLOW_FLUSHING)
|
||||||
|
gst_dtls_connection_set_flow_return (connection, self->src_ret);
|
||||||
g_mutex_unlock (&self->queue_lock);
|
g_mutex_unlock (&self->queue_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue