mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst_writev: Respect UIO_MAXIOV limit for the iov array
If we receive more than UIO_MAXIOV (1024 typically) buffers in a single writev call, fall back to consolidating them into one output buffer or multiple write calls. This could be made more optimal, but let's wait until it's ever a bottleneck for someone
This commit is contained in:
parent
abfcffde46
commit
e08db722f5
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ gst_writev (gint fd, const struct iovec *iov, gint iovcnt, gsize total_bytes)
|
|||
gssize written;
|
||||
|
||||
#ifdef HAVE_SYS_UIO_H
|
||||
if (TRUE) {
|
||||
if (iovcnt <= UIO_MAXIOV) {
|
||||
do {
|
||||
written = writev (fd, iov, iovcnt);
|
||||
} while (written < 0 && errno == EINTR);
|
||||
|
|
Loading…
Reference in a new issue