rtspconnection: Consistently translate GIOError to GstRTSPResult
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 15 Mar 2021 13:35:44 +0000 (19:05 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 16 Mar 2021 08:18:11 +0000 (08:18 +0000)
commit9b010366643a5723882e627a1b03523b2387e2c0
treee8e4d2a280fef0ffca110e797140347cf83cdb36
parentf4a1428a6997658625d529b9db60fde812fbf1ee
rtspconnection: Consistently translate GIOError to GstRTSPResult

The users of this API need to be able to differentiate between EINTR
and ERROR. For example, in rtspsrc, gst_rtsp_conninfo_connect()
behaves differently when gst_rtsp_connection_connect_with_response_usec()
returns an ERROR or EINTR. The former is an element error while the
latter is simple a GST_ERROR since it was a user cancellation of the
connection attempt.

Due to this, rtspsrc was incorrectly emitting element errors while
going to NULL, which would or would not reach the application in
a racy manner.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1069>
gst-libs/gst/rtsp/gstrtspconnection.c