summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-06-13 09:04:47 (GMT)
committerTim-Philipp Müller <tim@centricular.com>2014-06-13 09:04:47 (GMT)
commit79cf59b7dda4ef3453aa42a39b1859ea804e0cff (patch)
tree45ff685bd967991094fdbd936f2c70e27b6c1a04
parent593a52a6563303f647d08171336aaf66f5664722 (diff)
downloadgst-plugins-base-79cf59b7dda4ef3453aa42a39b1859ea804e0cff.tar.gz
gst-plugins-base-79cf59b7dda4ef3453aa42a39b1859ea804e0cff.tar.xz
tcpclientsrc: return FLUSHING when select() is canceled
https://bugzilla.gnome.org/show_bug.cgi?id=731567
-rw-r--r--gst/tcp/gsttcpclientsrc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c
index d3668b9..633665b 100644
--- a/gst/tcp/gsttcpclientsrc.c
+++ b/gst/tcp/gsttcpclientsrc.c
@@ -276,10 +276,16 @@ done:
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");
+ ret = GST_FLOW_FLUSHING;
+ } else {
+ GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
+ ("Select failed: %s", err->message));
+ ret = GST_FLOW_ERROR;
+ }
g_clear_error (&err);
- return GST_FLOW_ERROR;
+ return ret;
}
get_available_error:
{