srtobject: continue polling or report error on failed receive

fixes #1277

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1260>
This commit is contained in:
Peter Workman 2020-06-02 18:29:16 -03:00 committed by GStreamer Merge Bot
parent c4a2fd7683
commit b98712c44a

View file

@ -1264,6 +1264,17 @@ gst_srt_object_read (GstSRTObject * srtobject,
len = srt_recvmsg (rsock, (char *) (data), size);
if (len == SRT_ERROR) {
gint srt_errno = srt_getlasterror (NULL);
if (srt_errno == SRT_EASYNCRCV) {
continue;
} else {
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_READ,
"Failed to receive from SRT socket: %s", srt_getlasterror_str ());
return -1;
}
}
break;
}