udpsrc: fix SO_RCVBUF handling

This commit is contained in:
Wim Taymans 2012-03-13 20:36:56 +01:00
parent af59f573b5
commit d4a10f2909

View file

@ -112,6 +112,8 @@
#include <gst/net/gstnetaddressmeta.h> #include <gst/net/gstnetaddressmeta.h>
#include <sys/socket.h>
GST_DEBUG_CATEGORY_STATIC (udpsrc_debug); GST_DEBUG_CATEGORY_STATIC (udpsrc_debug);
#define GST_CAT_DEFAULT (udpsrc_debug) #define GST_CAT_DEFAULT (udpsrc_debug)
@ -785,9 +787,10 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
if (src->timeout) if (src->timeout)
g_socket_set_timeout (src->used_socket, src->timeout / GST_SECOND); g_socket_set_timeout (src->used_socket, src->timeout / GST_SECOND);
#ifdef SO_RECVBUF #ifdef SO_RCVBUF
{ {
gint rcvsize, ret; gint rcvsize, ret;
socklen_t len;
len = sizeof (rcvsize); len = sizeof (rcvsize);
if (src->buffer_size != 0) { if (src->buffer_size != 0) {