mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
srt: Consider EPOLLEMPTY an error when not unlocking
Seems that SRT can remove the socket from the poll by itself when the connection gets closed. Consider this an error condition and ensure we only "abort successfully" when we're actually trying to unlock. Needs more investigation but this is enough to prevent the element from getting stuck not reporting an error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4087>
This commit is contained in:
parent
cf5b659bc6
commit
d2202f516a
1 changed files with 3 additions and 3 deletions
|
@ -1526,7 +1526,7 @@ gst_srt_object_read (GstSRTObject * srtobject,
|
|||
gint srt_errno = srt_getlasterror (NULL);
|
||||
|
||||
#if SRT_VERSION_VALUE >= 0x010402
|
||||
if (srt_errno == SRT_EPOLLEMPTY)
|
||||
if (srt_errno == SRT_EPOLLEMPTY && g_cancellable_is_cancelled (cancellable))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
|
@ -1659,7 +1659,7 @@ gst_srt_object_send_headers (GstSRTObject * srtobject, SRTSOCKET sock,
|
|||
gint srt_errno = srt_getlasterror (NULL);
|
||||
|
||||
#if SRT_VERSION_VALUE >= 0x010402
|
||||
if (srt_errno == SRT_EPOLLEMPTY)
|
||||
if (srt_errno == SRT_EPOLLEMPTY && g_cancellable_is_cancelled (cancellable))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
|
@ -1821,7 +1821,7 @@ gst_srt_object_write_one (GstSRTObject * srtobject,
|
|||
gint srt_errno = srt_getlasterror (NULL);
|
||||
|
||||
#if SRT_VERSION_VALUE >= 0x010402
|
||||
if (srt_errno == SRT_EPOLLEMPTY)
|
||||
if (srt_errno == SRT_EPOLLEMPTY && g_cancellable_is_cancelled (cancellable))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue