diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
old mode 100644
new mode 100755
index b65b5e4..6ffbd7d
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -19,13 +19,11 @@
 
 #include <sys/ioctl.h>
 
+#include "rtsp-server.h"
 #include "rtsp-client.h"
 #include "rtsp-sdp.h"
 #include "rtsp-params.h"
 
-/* temporary multicast address until it's configurable somewhere */
-#define MCAST_ADDRESS "224.2.0.1"
-
 static GMutex *tunnels_lock;
 static GHashTable *tunnels;
 
@@ -137,6 +135,7 @@ gst_rtsp_client_finalize (GObject * obj)
     g_object_unref (client->media);
 
   g_free (client->server_ip);
+  g_free (client->mcast_address);
 
   G_OBJECT_CLASS (gst_rtsp_client_parent_class)->finalize (obj);
 }
@@ -836,7 +835,7 @@ handle_setup_request (GstRTSPClient * client, GstRTSPUrl * uri,
   /* we have a valid transport now, set the destination of the client. */
   g_free (ct->destination);
   if (ct->lower_transport == GST_RTSP_LOWER_TRANS_UDP_MCAST) {
-    ct->destination = g_strdup (MCAST_ADDRESS);
+    ct->destination = g_strdup (client->mcast_address);
   } else {
     url = gst_rtsp_connection_get_url (client->connection);
     ct->destination = g_strdup (url->host);
@@ -994,7 +993,7 @@ create_sdp (GstRTSPClient * client, GstRTSPMedia * media)
 
   info.server_proto = proto;
   if (media->protocols & GST_RTSP_LOWER_TRANS_UDP_MCAST)
-    info.server_ip = MCAST_ADDRESS;
+    info.server_ip = client->mcast_address;
   else
     info.server_ip = client->server_ip;
 
diff --git a/gst/rtsp-server/rtsp-client.h b/gst/rtsp-server/rtsp-client.h
old mode 100644
new mode 100755
index b29e218..3b75002
--- a/gst/rtsp-server/rtsp-client.h
+++ b/gst/rtsp-server/rtsp-client.h
@@ -78,6 +78,7 @@ struct _GstRTSPClient {
   GstRTSPWatch      *watch;
   guint              watchid;
   gchar             *server_ip;
+  gchar             *mcast_address;
   gboolean           is_ipv6;
 
   GstRTSPSessionPool   *session_pool;
diff --git a/gst/rtsp-server/rtsp-server.c b/gst/rtsp-server/rtsp-server.c
old mode 100644
new mode 100755
index 7f54798..674abf8
--- a/gst/rtsp-server/rtsp-server.c
+++ b/gst/rtsp-server/rtsp-server.c
@@ -23,6 +23,7 @@
 #include "rtsp-client.h"
 
 #define DEFAULT_ADDRESS         "0.0.0.0"
+#define DEFAULT_MCAST_ADDRESS   "224.2.0.1"
 /* #define DEFAULT_ADDRESS         "::0" */
 #define DEFAULT_SERVICE         "8554"
 #define DEFAULT_BACKLOG         5
@@ -31,6 +32,7 @@ enum
 {
   PROP_0,
   PROP_ADDRESS,
+  PROP_MCAST_ADDRESS,
   PROP_SERVICE,
   PROP_BACKLOG,
 
@@ -73,6 +75,17 @@ gst_rtsp_server_class_init (GstRTSPServerClass * klass)
   g_object_class_install_property (gobject_class, PROP_ADDRESS,
       g_param_spec_string ("address", "Address", "The address the server uses to listen on",
           DEFAULT_ADDRESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /**
+   * GstRTSPServer::mcast_address
+   *
+   * The multicast address on which the server will source
+   * media.
+   */
+  g_object_class_install_property (gobject_class, PROP_MCAST_ADDRESS,
+      g_param_spec_string ("mcast-address", "Multicast Address", "The multicast address on which the server will source media",
+          DEFAULT_MCAST_ADDRESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   /**
    * GstRTSPServer::service
    *
@@ -126,6 +139,7 @@ static void
 gst_rtsp_server_init (GstRTSPServer * server)
 {
   server->address = g_strdup (DEFAULT_ADDRESS);
+  server->mcast_address = g_strdup (DEFAULT_MCAST_ADDRESS);
   server->service = g_strdup (DEFAULT_SERVICE);
   server->backlog = DEFAULT_BACKLOG;
   server->session_pool = gst_rtsp_session_pool_new ();
@@ -138,6 +152,7 @@ gst_rtsp_server_finalize (GObject *object)
   GstRTSPServer *server = GST_RTSP_SERVER (object);
 
   g_free (server->address);
+  g_free (server->mcast_address);
   g_free (server->service);
 
   g_object_unref (server->session_pool);
@@ -195,6 +210,43 @@ gst_rtsp_server_get_address (GstRTSPServer *server)
 }
 
 /**
+ * gst_rtsp_server_set_mcast_address:
+ * @server: a #GstRTSPServer
+ * @address: the multicast address
+ *
+ * Set the multicast address on which the server will source
+ * media.
+ *
+ * This function must be called before the server is bound.
+ */
+void
+gst_rtsp_server_set_mcast_address (GstRTSPServer *server, const gchar *mcast_address)
+{
+  g_return_if_fail (GST_IS_RTSP_SERVER (server));
+  g_return_if_fail (mcast_address != NULL);
+
+  g_free (server->mcast_address);
+  server->mcast_address = g_strdup (mcast_address);
+}
+
+/**
+ * gst_rtsp_server_get_mcast_address:
+ * @server: a #GstRTSPServer
+ *
+ * Get the multicast address on which the server will source 
+ * media. 
+ *
+ * Returns: the server address. g_free() after usage.
+ */
+gchar *
+gst_rtsp_server_get_mcast_address (GstRTSPServer *server)
+{
+  g_return_val_if_fail (GST_IS_RTSP_SERVER (server), NULL);
+
+  return g_strdup (server->mcast_address);
+}
+
+/**
  * gst_rtsp_server_set_service:
  * @server: a #GstRTSPServer
  * @service: the service
@@ -370,6 +422,9 @@ gst_rtsp_server_get_property (GObject *object, guint propid,
     case PROP_ADDRESS:
       g_value_take_string (value, gst_rtsp_server_get_address (server));
       break;
+    case PROP_MCAST_ADDRESS:
+      g_value_take_string (value, gst_rtsp_server_get_mcast_address (server));
+      break;
     case PROP_SERVICE:
       g_value_take_string (value, gst_rtsp_server_get_service (server));
       break;
@@ -400,6 +455,9 @@ gst_rtsp_server_set_property (GObject *object, guint propid,
     case PROP_SERVICE:
       gst_rtsp_server_set_service (server, g_value_get_string (value));
       break;
+    case PROP_MCAST_ADDRESS:
+      gst_rtsp_server_set_mcast_address (server, g_value_get_string (value));
+      break;
     case PROP_BACKLOG:
       gst_rtsp_server_set_backlog (server, g_value_get_int (value));
       break;
@@ -421,6 +479,7 @@ gst_rtsp_server_sink_init_send (GstRTSPServer * server)
   int ret, sockfd;
   struct addrinfo hints;
   struct addrinfo *result, *rp;
+  struct linger linger;
 
   memset(&hints, 0, sizeof(struct addrinfo));
   hints.ai_family = AF_UNSPEC;     /* Allow IPv4 or IPv6 */
@@ -476,6 +535,13 @@ gst_rtsp_server_sink_init_send (GstRTSPServer * server)
           (void *) &ret, sizeof (ret)) < 0)
     goto keepalive_failed;
 
+  linger.l_onoff = 1;
+  linger.l_linger = 0;
+
+  if (setsockopt (server->server_sock.fd, SOL_SOCKET, SO_LINGER,
+          (void *) &linger, sizeof (linger)) < 0)
+    goto linger_failed;
+
   /* set the server socket to nonblocking */
   fcntl (server->server_sock.fd, F_SETFL, O_NONBLOCK);
 
@@ -512,6 +578,15 @@ reuse_failed:
     GST_ERROR_OBJECT (server, "failed to reuse socket: %s", g_strerror (errno));
     return FALSE;
   }
+linger_failed:
+  {
+    if (server->server_sock.fd >= 0) {
+      close (server->server_sock.fd);
+      server->server_sock.fd = -1;
+    }
+    GST_ERROR_OBJECT (server, "failed to no linger socket: %s", g_strerror (errno));
+    return FALSE;
+  }
 keepalive_failed:
   {
     if (server->server_sock.fd >= 0) {
@@ -553,6 +628,8 @@ default_accept_client (GstRTSPServer *server, GIOChannel *channel)
   if (!gst_rtsp_client_accept (client, channel))
     goto accept_failed;
 
+  client->mcast_address = strdup(gst_rtsp_server_get_mcast_address(server));
+
   return client;
 
   /* ERRORS */
diff --git a/gst/rtsp-server/rtsp-server.h b/gst/rtsp-server/rtsp-server.h
old mode 100644
new mode 100755
index 5bbb4f2..78517c9
--- a/gst/rtsp-server/rtsp-server.h
+++ b/gst/rtsp-server/rtsp-server.h
@@ -59,6 +59,7 @@ struct _GstRTSPServer {
 
   /* server information */
   gchar *address;
+  gchar *mcast_address;
   gchar *service;
   gint   backlog;
 
@@ -97,6 +98,9 @@ GstRTSPServer *       gst_rtsp_server_new                  (void);
 void                  gst_rtsp_server_set_address          (GstRTSPServer *server, const gchar *address);
 gchar *               gst_rtsp_server_get_address          (GstRTSPServer *server);
 
+void                  gst_rtsp_server_set_mcast_address    (GstRTSPServer *server, const gchar *mcast_address);
+gchar *               gst_rtsp_server_get_mcast_address    (GstRTSPServer *server);
+
 void                  gst_rtsp_server_set_service          (GstRTSPServer *server, const gchar *service);
 gchar *               gst_rtsp_server_get_service          (GstRTSPServer *server);
 
