mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
rtmp2sink: Correctly return GST_FLOW_ERROR on error
If there is an error while connecting, the streaming task will be stopped, and is_running() will be false, causing a GST_FLOW_FLUSHING to be returned. Instead, we perform the error check (!self->connection) first, to return an error if that's what occured. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3189>
This commit is contained in:
parent
ece84d69a2
commit
34ca46c786
1 changed files with 4 additions and 4 deletions
|
@ -861,13 +861,13 @@ gst_rtmp2_sink_render (GstBaseSink * sink, GstBuffer * buffer)
|
||||||
g_cond_wait (&self->cond, &self->lock);
|
g_cond_wait (&self->cond, &self->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (!is_running (self))) {
|
if (G_UNLIKELY (!self->connection)) {
|
||||||
gst_buffer_unref (message);
|
|
||||||
ret = GST_FLOW_FLUSHING;
|
|
||||||
} else if (G_UNLIKELY (!self->connection)) {
|
|
||||||
gst_buffer_unref (message);
|
gst_buffer_unref (message);
|
||||||
/* send_connect_error has sent an ERROR message */
|
/* send_connect_error has sent an ERROR message */
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
|
} else if (G_UNLIKELY (!is_running (self))) {
|
||||||
|
gst_buffer_unref (message);
|
||||||
|
ret = GST_FLOW_FLUSHING;
|
||||||
} else {
|
} else {
|
||||||
send_streamheader (self);
|
send_streamheader (self);
|
||||||
send_message (self, message);
|
send_message (self, message);
|
||||||
|
|
Loading…
Reference in a new issue