[Libreoffice-commits] core.git: avmedia/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 27 21:02:16 UTC 2020


 avmedia/source/vlc/wrapper/Player.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 78568fc29315fd653b39d8911e690703446bdc76
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jan 27 18:48:33 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Jan 27 22:01:41 2020 +0100

    Fix order of MACOSX vs. UNX checks
    
    ...where UNX is also defined on macOS, as spotted by Mike Kaganski at
    <https://gerrit.libreoffice.org/c/core/+/87372#message-d1cf7f65_776ae3cd>.  The
    order appears to have been broken ever since
    fd47df122a37b4fa982f9fd0000907d9aee0c80a "Fix typos and make the VLC code in
    theory work as 64-bit on Windows and OS X".
    
    Change-Id: I83fa7937d560d88d66856660f143e883265fefd4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87547
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx
index e80b8df043bb..27e63a21a6d0 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -36,10 +36,10 @@ namespace { extern "C" {
                                           const char *psz_filepath,
                                           unsigned int i_width,
                                           unsigned int i_height );
-#if defined UNX
-    void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable );
-#elif defined MACOSX
+#if defined MACOSX
     void ( *libvlc_media_player_set_nsobject ) ( libvlc_media_player_t *p_mi, void *drawable );
+#elif defined UNX
+    void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable );
 #elif defined _WIN32
     void ( *libvlc_media_player_set_hwnd ) ( libvlc_media_player_t *p_mi, void *drawable );
 #else
@@ -79,10 +79,10 @@ namespace avmedia::vlc::wrapper
             SYM_MAP( libvlc_audio_set_mute ),
             SYM_MAP( libvlc_audio_get_mute ),
             SYM_MAP( libvlc_video_take_snapshot ),
-#if defined UNX
-            SYM_MAP( libvlc_media_player_set_xwindow ),
-#elif defined MACOSX
+#if defined MACOSX
             SYM_MAP( libvlc_media_player_set_nsobject ),
+#elif defined UNX
+            SYM_MAP( libvlc_media_player_set_xwindow ),
 #elif defined _WIN32
             SYM_MAP( libvlc_media_player_set_hwnd ),
 #endif
@@ -216,10 +216,10 @@ namespace avmedia::vlc::wrapper
 
     void Player::setWindow( intptr_t id )
     {
-#if defined UNX
-        libvlc_media_player_set_xwindow( mPlayer, static_cast<uint32_t>(id) );
-#elif defined MACOSX
+#if defined MACOSX
         libvlc_media_player_set_nsobject( mPlayer, reinterpret_cast<void*>( id ) );
+#elif defined UNX
+        libvlc_media_player_set_xwindow( mPlayer, static_cast<uint32_t>(id) );
 #elif defined _WIN32
         libvlc_media_player_set_hwnd( mPlayer, reinterpret_cast<void*>( id ) );
 #endif


More information about the Libreoffice-commits mailing list