[vlc-commits] Revert "macosx: fixed compilation warning and potential, runtime exception "

Josh Watzman git at videolan.org
Tue Oct 22 20:58:03 CEST 2013


vlc/vlc-2.1 | branch: master | Josh Watzman <jwatzman at jwatzman.org> | Wed Oct 16 05:21:40 2013 +0000| [14a10733bd40f52927a5cc2a6a1a1f44067198f5] | committer: Felix Paul Kühne

Revert "macosx: fixed compilation warning and potential, runtime exception"

This reverts commit 55e3f94302a29e9ee76532c290c1134af5f0213e and fixes it the right way. I'm honestly not sure what's going on in that commit -- it silences the compiler warning not by actually fixing the problem (which is that the method isn't declared in the interface) but just by not making the method call visible to the compiler! It also completely breaks the feature, by moving things onto the main thread that can't be there, causing a deadlock, as specifically noted in the comment right above this code.

In any event, it's easy enough to revert and add to the interface properly, silencing the compiler warning and unbreaking this extension feature.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit 8fdbf0f2e032f0467e39571bae0495ac59e2a4eb)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=14a10733bd40f52927a5cc2a6a1a1f44067198f5
---

 modules/gui/macosx/intf.h |    1 +
 modules/gui/macosx/intf.m |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index e26f654..fdb2ff1 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -183,6 +183,7 @@ struct intf_sys_t
 - (BOOL)hasDefinedShortcutKey:(NSEvent *)o_event force:(BOOL)b_force;
 
 - (void)PlaylistItemChanged;
+- (void)informInputChanged;
 - (void)playbackStatusUpdated;
 - (void)sendDistributedNotificationWithUpdatedPlaybackStatus;
 - (void)playbackModeUpdated;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index aa1378d..a213502 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -430,8 +430,8 @@ static int PLItemChanged(vlc_object_t *p_this, const char *psz_var,
      * and other issues, we need to wait for -PlaylistItemChanged to finish and
      * then -informInputChanged on this non-main thread. */
     [o_plItemChangedLock lock];
-    [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(PlaylistItemChanged) withObject:nil waitUntilDone:YES];
-    [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(informInputChanged) withObject:nil waitUntilDone:YES];
+    [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(PlaylistItemChanged) withObject:nil waitUntilDone:YES]; // MUST BE ON MAIN THREAD
+    [[VLCMain sharedInstance] informInputChanged]; // DO NOT MOVE TO MAIN THREAD
     [o_plItemChangedLock unlock];
 
     [o_pool release];



More information about the vlc-commits mailing list