client: refuse to change the MTU on shared media
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 27 Oct 2012 19:05:03 +0000 (21:05 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sat, 27 Oct 2012 19:05:03 +0000 (21:05 +0200)
If we change the MTU of chared media, it changes for all clients.
We don't want to set the MTU to something large for clients that
stream over UDP.

gst/rtsp-server/rtsp-client.c

index c04eec5..cdf1b2c 100644 (file)
@@ -910,6 +910,11 @@ handle_blocksize (GstRTSPMedia * media, GstRTSPMessage * request)
       GST_ERROR ("failed to parse blocksize");
       ret = FALSE;
     } else {
+      /* we don't want to change the mtu when this media
+       * can be shared because it impacts other clients */
+      if (gst_rtsp_media_is_shared (media))
+        return TRUE;
+
       if (blocksize > G_MAXUINT)
         blocksize = G_MAXUINT;
       gst_rtsp_media_set_mtu (media, blocksize);