--- gstreamer0.10-rtsp-0.10.8.orig/gst/rtsp-server/rtsp-media.c
+++ gstreamer0.10-rtsp-0.10.8/gst/rtsp-server/rtsp-media.c
@@ -32,6 +32,8 @@
 //#define DEFAULT_PROTOCOLS      GST_RTSP_LOWER_TRANS_UDP_MCAST
 #define DEFAULT_EOS_SHUTDOWN   FALSE
 
+#define DEFAULT_MCAST_ADDRESS "224.2.0.2"
+
 /* define to dump received RTCP packets */
 #undef DUMP_STATS
 
@@ -42,6 +44,7 @@ enum
   PROP_REUSABLE,
   PROP_PROTOCOLS,
   PROP_EOS_SHUTDOWN,
+  PROP_MC_OVERRIDE,
   PROP_LAST
 };
 
@@ -106,6 +109,11 @@ gst_rtsp_media_class_init (GstRTSPMediaC
           "Send an EOS event to the pipeline before unpreparing",
           DEFAULT_EOS_SHUTDOWN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+    g_object_class_install_property (gobject_class, PROP_MC_OVERRIDE,
+      g_param_spec_string ("mc-override", 
+	  "Multicast Override", "Override the MC address in the SDP with another one",
+      DEFAULT_MCAST_ADDRESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   gst_rtsp_media_signals[SIGNAL_PREPARED] =
       g_signal_new ("prepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
       G_STRUCT_OFFSET (GstRTSPMediaClass, prepared), NULL, NULL,
@@ -150,6 +158,8 @@ gst_rtsp_media_init (GstRTSPMedia * medi
   media->reusable = DEFAULT_REUSABLE;
   media->protocols = DEFAULT_PROTOCOLS;
   media->eos_shutdown = DEFAULT_EOS_SHUTDOWN;
+
+  media->mc_override = g_strdup(DEFAULT_MCAST_ADDRESS);
 }
 
 /* FIXME. this should be done in multiudpsink */
@@ -289,6 +299,9 @@ gst_rtsp_media_get_property (GObject * o
     case PROP_EOS_SHUTDOWN:
       g_value_set_boolean (value, gst_rtsp_media_is_eos_shutdown (media));
       break;
+    case PROP_MC_OVERRIDE:
+      g_value_set_string (value, gst_rtsp_media_get_mc_override(media));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
   }
@@ -313,6 +326,9 @@ gst_rtsp_media_set_property (GObject * o
     case PROP_EOS_SHUTDOWN:
       gst_rtsp_media_set_eos_shutdown (media, g_value_get_boolean (value));
       break;
+    case PROP_MC_OVERRIDE:
+      gst_rtsp_media_set_mc_override (media, g_value_get_string(value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
   }
@@ -493,6 +509,41 @@ gst_rtsp_media_get_protocols (GstRTSPMed
 }
 
 /**
+ * gst_rtsp_media_set_mc_override:
+ * @media: a #GstRTSPMedia
+ * @addr: the new value
+ *
+ * Store the multicast address to use when mutilcast is in the transports for RTSP.
+ */
+void
+gst_rtsp_media_set_mc_override (GstRTSPMedia *media, const gchar *addr)
+{
+  g_return_if_fail (GST_IS_RTSP_MEDIA (media));
+
+  if(media->mc_override) g_free(media->mc_override);
+  media->mc_override = g_strdup(addr);
+}
+
+/**
+ * gst_rtsp_media_get_mc_override:
+ * @media: a #GstRTSPMedia
+ *
+ * Get the multicast override address
+ *
+ * Returns: a #gchar
+ */
+gchar* 
+gst_rtsp_media_get_mc_override (GstRTSPMedia *media)
+{ 
+  gchar *result = NULL;
+  
+  g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), NULL);
+  if(media->mc_override) result = g_strdup (media->mc_override);
+
+  return result;
+}
+
+/**
  * gst_rtsp_media_set_eos_shutdown:
  * @media: a #GstRTSPMedia
  * @eos_shutdown: the new value
--- gstreamer0.10-rtsp-0.10.8.orig/gst/rtsp-server/rtsp-media.h
+++ gstreamer0.10-rtsp-0.10.8/gst/rtsp-server/rtsp-media.h
@@ -231,6 +231,8 @@ struct _GstRTSPMedia {
 
   /* the range of media */
   GstRTSPTimeRange   range;
+
+  gchar *mc_override;
 };
 
 /**
@@ -280,6 +282,9 @@ GstRTSPLowerTrans     gst_rtsp_media_get
 void                  gst_rtsp_media_set_eos_shutdown (GstRTSPMedia *media, gboolean eos_shutdown);
 gboolean              gst_rtsp_media_is_eos_shutdown  (GstRTSPMedia *media);
 
+void                  gst_rtsp_media_set_mc_override  (GstRTSPMedia *media, const gchar *addr);
+gchar*                gst_rtsp_media_get_mc_override  (GstRTSPMedia *media);
+
 void                  gst_rtsp_media_set_auth         (GstRTSPMedia *media, GstRTSPAuth *auth);
 GstRTSPAuth *         gst_rtsp_media_get_auth         (GstRTSPMedia *media);
 
--- gstreamer0.10-rtsp-0.10.8.orig/gst/rtsp-server/rtsp-media-factory.c
+++ gstreamer0.10-rtsp-0.10.8/gst/rtsp-server/rtsp-media-factory.c
@@ -22,6 +22,7 @@
 #define DEFAULT_LAUNCH         NULL
 #define DEFAULT_SHARED         FALSE
 #define DEFAULT_EOS_SHUTDOWN   FALSE
+#define DEFAULT_MCAST_ADDRESS "224.2.0.3"
 
 enum
 {
@@ -29,6 +30,7 @@ enum
   PROP_LAUNCH,
   PROP_SHARED,
   PROP_EOS_SHUTDOWN,
+  PROP_MC_OVERRIDE,
   PROP_LAST
 };
 
@@ -96,6 +98,11 @@ gst_rtsp_media_factory_class_init (GstRT
           "Send EOS down the pipeline before shutting down",
           DEFAULT_EOS_SHUTDOWN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+    g_object_class_install_property (gobject_class, PROP_MC_OVERRIDE,
+      g_param_spec_string ("mc-override", 
+	  "Multicast Override", "Override the MC address in the SDP with another one",
+      DEFAULT_MCAST_ADDRESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
   klass->gen_key = default_gen_key;
   klass->get_element = default_get_element;
   klass->construct = default_construct;
@@ -117,6 +124,8 @@ gst_rtsp_media_factory_init (GstRTSPMedi
   factory->medias_lock = g_mutex_new ();
   factory->medias = g_hash_table_new_full (g_str_hash, g_str_equal,
       g_free, g_object_unref);
+
+  factory->mc_override = g_strdup(DEFAULT_MCAST_ADDRESS);
 }
 
 static void
@@ -151,6 +160,9 @@ gst_rtsp_media_factory_get_property (GOb
       g_value_set_boolean (value,
           gst_rtsp_media_factory_is_eos_shutdown (factory));
       break;
+    case PROP_MC_OVERRIDE:
+      g_value_set_string (value, gst_rtsp_media_factory_get_mc_override(factory));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
   }
@@ -173,6 +185,9 @@ gst_rtsp_media_factory_set_property (GOb
       gst_rtsp_media_factory_set_eos_shutdown (factory,
           g_value_get_boolean (value));
       break;
+    case PROP_MC_OVERRIDE:
+      gst_rtsp_media_factory_set_mc_override(factory, g_value_get_string(value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
   }
@@ -377,6 +392,47 @@ gst_rtsp_media_factory_get_auth (GstRTSP
   return result;
 }
 
+/**
+ * gst_rtsp_media_factory_set_mc_override:
+ * @media: a #GstRTSPMediaFactory
+ * @addr: the new value
+ *
+ * Store the multicast address to use when mutilcast is in the transports for RTSP.
+ */
+void
+gst_rtsp_media_factory_set_mc_override (GstRTSPMediaFactory *factory, const gchar *addr)
+{
+  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));
+  g_return_if_fail (addr != NULL);
+
+  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
+  g_free (factory->mc_override);
+  factory->mc_override= g_strdup (addr);
+  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
+}
+
+/**
+ * gst_rtsp_media_factory_get_mc_override:
+ * @media: a #GstRTSPMediaFactory
+ *
+ * Get the multicast override address
+ *
+ * Returns: a #gchar
+ */
+gchar* 
+gst_rtsp_media_factory_get_mc_override (GstRTSPMediaFactory *factory)
+{ 
+  gchar *result;
+
+  g_return_val_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory), NULL);
+
+  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
+  result = g_strdup (factory->mc_override);
+  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
+
+  return result;
+}
+
 static gboolean
 compare_media (gpointer key, GstRTSPMedia * media1, GstRTSPMedia * media2)
 {
@@ -607,6 +663,10 @@ default_construct (GstRTSPMediaFactory *
   media = gst_rtsp_media_new ();
   media->element = element;
 
+  g_object_set(G_OBJECT(media), 
+		  "mc-override", factory->mc_override, 
+		  NULL);
+
   media->pipeline = klass->create_pipeline (factory, media);
   if (media->pipeline == NULL)
     goto no_pipeline;
--- gstreamer0.10-rtsp-0.10.8.orig/gst/rtsp-server/rtsp-client.c
+++ gstreamer0.10-rtsp-0.10.8/gst/rtsp-server/rtsp-client.c
@@ -979,6 +979,11 @@ handle_setup_request (GstRTSPClient * cl
       gst_rtsp_session_media_alloc_channels (media, &ct->interleaved);
     }
   }
+  else {
+    /* correct the destination */
+    if(ct->destination) g_free(ct->destination);
+    ct->destination = gst_rtsp_media_get_mc_override(media->media);
+  }
 
   /* get a handle to the stream in the media */
   if (!(stream = gst_rtsp_session_media_get_stream (media, streamid)))
--- gstreamer0.10-rtsp-0.10.8.orig/gst/rtsp-server/rtsp-media-factory.h
+++ gstreamer0.10-rtsp-0.10.8/gst/rtsp-server/rtsp-media-factory.h
@@ -67,6 +67,8 @@ struct _GstRTSPMediaFactory {
 
   GMutex       *medias_lock;
   GHashTable   *medias;
+
+  gchar *mc_override;
 };
 
 /**
@@ -121,6 +123,8 @@ gboolean              gst_rtsp_media_fac
 void                  gst_rtsp_media_factory_set_auth     (GstRTSPMediaFactory *factory, GstRTSPAuth *auth);
 GstRTSPAuth *         gst_rtsp_media_factory_get_auth     (GstRTSPMediaFactory *factory);
 
+gchar*                gst_rtsp_media_factory_get_mc_override (GstRTSPMediaFactory *factory);
+void                  gst_rtsp_media_factory_set_mc_override (GstRTSPMediaFactory *factory, const gchar *addr);
 
 /* creating the media from the factory and a url */
 GstRTSPMedia *        gst_rtsp_media_factory_construct    (GstRTSPMediaFactory *factory,
