--- gstrtspsrc.h	2010-08-26 10:41:38.000000000 -0400
+++ gstrtspsrc.h	2010-08-26 10:41:38.000000000 -0400
@@ -182,6 +182,7 @@
   GstRTSPLowerTrans protocols;
   gboolean          debug;
   guint   	    retry;
+  gint              udp_buffer_size;
   guint64           udp_timeout;
   GTimeVal          tcp_timeout;
   GTimeVal         *ptcp_timeout;
--- gstrtspsrc.c	2010-08-26 10:41:21.000000000 -0400
+++ gstrtspsrc.c	2010-08-26 10:41:22.000000000 -0400
@@ -143,6 +143,7 @@
 #define DEFAULT_DEBUG            FALSE
 #define DEFAULT_RETRY            20
 #define DEFAULT_TIMEOUT          5000000
+#define DEFAULT_UDPBUFFERSIZE    0
 #define DEFAULT_TCP_TIMEOUT      20000000
 #define DEFAULT_LATENCY_MS       3000
 #define DEFAULT_CONNECTION_SPEED 0
@@ -160,6 +161,7 @@
   PROP_PROTOCOLS,
   PROP_DEBUG,
   PROP_RETRY,
+  PROP_UDP_BUFFER_SIZE,
   PROP_TIMEOUT,
   PROP_TCP_TIMEOUT,
   PROP_LATENCY,
@@ -323,6 +325,12 @@
           0, G_MAXUINT16, DEFAULT_RETRY,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
+  g_object_class_install_property (gobject_class, PROP_UDP_BUFFER_SIZE,
+      g_param_spec_int ("udp-buffer-size", "UDP Buffer Size",
+          "Size of the kernel UDP receive buffer in bytes, 0=default",
+          0, G_MAXINT, DEFAULT_UDPBUFFERSIZE,
+          G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
   g_object_class_install_property (gobject_class, PROP_TIMEOUT,
       g_param_spec_uint64 ("timeout", "Timeout",
           "Retry TCP transport after UDP timeout microseconds (0 = disabled)",
@@ -548,6 +556,9 @@
     case PROP_TIMEOUT:
       rtspsrc->udp_timeout = g_value_get_uint64 (value);
       break;
+    case PROP_UDP_BUFFER_SIZE:
+      rtspsrc->udp_buffer_size = g_value_get_int (value);
+      break;
     case PROP_TCP_TIMEOUT:
     {
       guint64 timeout = g_value_get_uint64 (value);
@@ -615,6 +626,9 @@
     case PROP_TIMEOUT:
       g_value_set_uint64 (value, rtspsrc->udp_timeout);
       break;
+    case PROP_UDP_BUFFER_SIZE:
+      g_value_set_int (value, rtspsrc->udp_buffer_size);
+      break;
     case PROP_TCP_TIMEOUT:
     {
       guint64 timeout;
@@ -2270,6 +2284,8 @@
      * if we can. */
     g_object_set (G_OBJECT (stream->udpsrc[0]), "timeout", src->udp_timeout,
         NULL);
+    g_object_set (G_OBJECT (stream->udpsrc[0]), "buffer-size",
+        src->udp_buffer_size, NULL);
 
     /* get output pad of the UDP source. */
     *outpad = gst_element_get_static_pad (stream->udpsrc[0], "src");
