mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
tcpserversrc: return FLOW_FLUSHING instead of an error when accept/select is canceled
Canceling the accept/select happens when the source is shut down. This is not an error and the GST_FLOW_ERROR causes problems when only part of the pipeline is shut down. https://bugzilla.gnome.org/show_bug.cgi?id=731567
This commit is contained in:
parent
072fa3543e
commit
593a52a656
1 changed files with 12 additions and 4 deletions
|
@ -295,19 +295,27 @@ accept_error:
|
|||
{
|
||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||
GST_DEBUG_OBJECT (src, "Cancelled accepting of client");
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
|
||||
("Failed to accept client: %s", err->message));
|
||||
ret = GST_FLOW_ERROR;
|
||||
}
|
||||
g_clear_error (&err);
|
||||
return GST_FLOW_ERROR;
|
||||
return ret;
|
||||
}
|
||||
select_error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
|
||||
("Select failed: %s", err->message));
|
||||
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||
GST_DEBUG_OBJECT (src, "Cancelled select");
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
|
||||
("Select failed: %s", err->message));
|
||||
ret = GST_FLOW_ERROR;
|
||||
}
|
||||
g_clear_error (&err);
|
||||
return GST_FLOW_ERROR;
|
||||
return ret;
|
||||
}
|
||||
get_available_error:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue