mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
c4a2fd7683
commit
b98712c44a
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue