summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-05-25 20:11:31 -0400
committerThibault Saunier <tsaunier@igalia.com>2020-05-25 20:13:06 -0400
commit3fdae346cab21f66d0beef283e46314ae5741943 (patch)
treed14a0263ca3c2228e613fe9cbbdf8b2fbfc6f786
parent3ea71a63f674e4fb01006f4c43ddef19e080187a (diff)
rtspsrc: Error out when failling to receive message response
And let it rety twice. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/717 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/601>
-rw-r--r--gst/rtsp/gstrtspsrc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index f97f0a9853..a2d258fc98 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -6476,6 +6476,10 @@ again:
goto again;
}
}
+
+ if (res < 0)
+ goto receive_error;
+
gst_rtsp_ext_list_after_send (src->extensions, request, response);
return res;
@@ -6493,6 +6497,20 @@ send_error:
g_free (str);
return res;
}
+
+receive_error:
+ {
+ gchar *str = gst_rtsp_strresult (res);
+
+ if (res != GST_RTSP_EINTR) {
+ GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
+ ("Could not receive message. (%s)", str));
+ } else {
+ GST_WARNING_OBJECT (src, "receive interrupted");
+ }
+ g_free (str);
+ return res;
+ }
}
/**