diff --git a/examples/test-video.c b/examples/test-video.c
index 087da08..0fad29c 100644
--- a/examples/test-video.c
+++ b/examples/test-video.c
@@ -23,11 +23,11 @@
 
 /* define this if you want the resource to only be available when using
  * user/password as the password */
-#undef WITH_AUTH
+#define WITH_AUTH
 
 /* define this if you want the server to use TLS (it will also need WITH_AUTH
  * to be defined) */
-#undef WITH_TLS
+#define WITH_TLS
 
 /* this timeout is periodically run to clean up the expired sessions from the
  * pool. This needs to be run explicitly currently but might be done
@@ -48,6 +48,7 @@ int
 main (int argc, char *argv[])
 {
   GMainLoop *loop;
+  GMainContext *context;
   GstRTSPServer *server;
   GstRTSPMountPoints *mounts;
   GstRTSPMediaFactory *factory;
@@ -64,7 +65,9 @@ main (int argc, char *argv[])
 
   gst_init (&argc, &argv);
 
-  loop = g_main_loop_new (NULL, FALSE);
+  context = g_main_context_new ();
+
+  loop = g_main_loop_new (context, FALSE);
 
   /* create a server instance */
   server = gst_rtsp_server_new ();
@@ -152,7 +155,7 @@ main (int argc, char *argv[])
   g_object_unref (mounts);
 
   /* attach the server to the default maincontext */
-  if (gst_rtsp_server_attach (server, NULL) == 0)
+  if (gst_rtsp_server_attach (server, context) == 0)
     goto failed;
 
   /* add a timeout for the session cleanup */
