]> git.sesse.net Git - vlc/commitdiff
qt: remove tautology
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 4 Feb 2015 19:12:50 +0000 (21:12 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 4 Feb 2015 19:13:26 +0000 (21:13 +0200)
(The libvlc object is always "alive" since it is never "killed").

modules/access/avcapture.m
modules/access/qtcapture.m

index 730c6bd9987c74267b223123c4a6d16d5532f124..1e2a6816cdf471ab0d10008db7e49c5327abfc4a 100644 (file)
@@ -380,14 +380,11 @@ static void Close(vlc_object_t *p_this)
 
     msg_Dbg(p_demux,"Close AVCapture");
 
-    if ( vlc_object_alive(p_this->p_libvlc) )
-    {
-        // Perform this on main thread, as the framework itself will sometimes try to synchronously
-        // work on main thread. And this will create a dead lock.
-        [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];
-        [p_sys->output performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
-        [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
-    }
+    // Perform this on main thread, as the framework itself will sometimes try to synchronously
+    // work on main thread. And this will create a dead lock.
+    [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];
+    [p_sys->output performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
+    [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
 
     free(p_sys);
 
index 4cd3ff9e6554c4595d6ee88a475b04fb7975cd39..611b89f05975367dc65c8e978001790443a2f330 100644 (file)
@@ -395,16 +395,11 @@ static void Close(vlc_object_t *p_this)
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    /* Hack: if libvlc was killed, main interface thread was,
-     * and poor QTKit needs it, so don't tell him.
-     * Else we dead lock. */
-    if (vlc_object_alive(p_this->p_libvlc)) {
-        // Perform this on main thread, as the framework itself will sometimes try to synchronously
-        // work on main thread. And this will create a dead lock.
-        [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];
-        [p_sys->output performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
-        [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
-    }
+    // Perform this on main thread, as the framework itself will sometimes try to synchronously
+    // work on main thread. And this will create a dead lock.
+    [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];
+    [p_sys->output performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
+    [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
     free(p_sys);
 
     [pool release];