summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-05-25 20:11:31 -0400
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-09-25 06:52:55 +0000
commit2f4fc45b6bbb668ee192a18e698eab816ebc9dd8 (patch)
tree65f0096ee26e03f493f8c1fc9afabebf256a76ef
parent20e4b0026680f53c45ccceb7c35d0ec2d451a6cd (diff)
downloadgstreamer-plugins-good-2f4fc45b6bbb668ee192a18e698eab816ebc9dd8.tar.gz
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/743>
-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 db671c7c9..583168dab 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -6387,6 +6387,10 @@ again:
goto again;
}
}
+
+ if (res < 0)
+ goto receive_error;
+
gst_rtsp_ext_list_after_send (src->extensions, request, response);
return res;
@@ -6404,6 +6408,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;
+ }
}
/**