[vlc-commits] qt: remove tautology

Rémi Denis-Courmont git at videolan.org
Wed Feb 4 20:13:33 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb  4 21:12:50 2015 +0200| [8fee495deed85252d39d2d473c7668c95fa94270] | committer: Rémi Denis-Courmont

qt: remove tautology

(The libvlc object is always "alive" since it is never "killed").

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fee495deed85252d39d2d473c7668c95fa94270
---

 modules/access/avcapture.m |   13 +++++--------
 modules/access/qtcapture.m |   15 +++++----------
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index 730c6bd..1e2a681 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -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);
 
diff --git a/modules/access/qtcapture.m b/modules/access/qtcapture.m
index 4cd3ff9..611b89f 100644
--- a/modules/access/qtcapture.m
+++ b/modules/access/qtcapture.m
@@ -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];



More information about the vlc-commits mailing list