udpsrc: Balance Linux value of get/set_rcvbuf
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 17 Aug 2018 18:17:39 +0000 (14:17 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 17 Aug 2018 18:24:25 +0000 (14:24 -0400)
commitc61bcb1fd2fcdd666c975f6ac571041ef133f430
tree39812046c97b071995f9071da16177a2f62325e0
parent9b4a022dee7351f1f1a5f9d6323253bc769aa556
udpsrc: Balance Linux value of get/set_rcvbuf

On Linux, the kernel returns twice the size as it will allocate extra
space for accouting. We devides this value by two in order to ensure
that get/set value now match. This fixes the set buffer size validation
and allow having a nice warning when the size if surpassed and the
process does not have CAP_NET_ADMIN capabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=727067
gst/udp/gstudpsrc.c