]> git.sesse.net Git - vlc/blobdiff - modules/control/netsync.c
Qt: allow to select inexistent files from Prefs
[vlc] / modules / control / netsync.c
index 63fb8f40baff81607a12f3dfaa67a6d1ff34ef67..455be184dcbb1f71c74630c12d707a43ecba0667 100644 (file)
@@ -139,7 +139,7 @@ static int Open(vlc_object_t *object)
     sys->timeout = var_InheritInteger(intf, "netsync-timeout");
     if (sys->timeout < 500)
         sys->timeout = 500;
-    sys->playlist = pl_Hold(intf);
+    sys->playlist = pl_Get(intf);
     sys->input = NULL;
 
     var_AddCallback(sys->playlist, "input-current", PlaylistEvent, intf);
@@ -156,7 +156,6 @@ void Close(vlc_object_t *object)
 
     assert(sys->input == NULL);
     var_DelCallback(sys->playlist, "input-current", PlaylistEvent, intf);
-    pl_Release(intf);
     net_Close(sys->fd);
     free(sys);
 }
@@ -164,8 +163,9 @@ void Close(vlc_object_t *object)
 static mtime_t GetPcrSystem(input_thread_t *input)
 {
     int canc = vlc_savecancel();
+    /* TODO use the delay */
     mtime_t system;
-    if (input_GetPcrSystem(input, &system))
+    if (input_GetPcrSystem(input, &system, NULL))
         system = -1;
     vlc_restorecancel(canc);
 
@@ -251,7 +251,7 @@ static void *Slave(void *handle)
             int canc = vlc_savecancel();
 
             mtime_t client_system;
-            if (!input_GetPcrSystem(sys->input, &client_system)) {
+            if (!input_GetPcrSystem(sys->input, &client_system, NULL)) {
                 const mtime_t diff_system = client_system - master_system - diff_date;
                 if (diff_system != 0) {
                     input_ModifyPcrSystem(sys->input, true, master_system - diff_date);