[vlc-devel] [PATCH] Support for newest freerdp snapshot

Paweł Stankowski aambitny at gmail.com
Sat Nov 29 21:33:18 CET 2014


Support for newest freerdp snapshot [part 2]

'freerdp_channels_global_init' and '...uninit' functions were removed
in version 1.2 of freerdp, because they had empty definitions.
Checking whether FREERDP_VERSION_* macros are defined was wrong as old
FreeRDP versions do not define these.


diff --git a/modules/access/rdp.c b/modules/access/rdp.c
index 1dca8ae..1d1bfe4 100644
--- a/modules/access/rdp.c
+++ b/modules/access/rdp.c
@@ -250,8 +250,7 @@ static bool postConnectHandler( freerdp *p_instance )

     gdi_init( p_instance,
                 CLRBUF_16BPP |
-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
-    !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 &&
FREERDP_VERSION_MINOR >= 2))
+#if !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 &&
FREERDP_VERSION_MINOR >= 2))
                 CLRBUF_24BPP |
 #endif
                 CLRBUF_32BPP, NULL );
@@ -428,7 +427,9 @@ static int Open( vlc_object_t *p_this )
     if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0;
     p_sys->i_frame_interval = 1000000 / p_sys->f_fps;

+#if !defined(FREERDP_VERSION_MAJOR) || (FREERDP_VERSION_MAJOR == 1 &&
FREERDP_VERSION_MINOR < 2)
     freerdp_channels_global_init();
+#endif

     p_sys->p_instance = freerdp_new();
     if ( !p_sys->p_instance )
@@ -504,7 +505,9 @@ static void Close( vlc_object_t *p_this )

     freerdp_disconnect( p_sys->p_instance );
     freerdp_free( p_sys->p_instance );
+#if !defined(FREERDP_VERSION_MAJOR) || (FREERDP_VERSION_MAJOR == 1 &&
FREERDP_VERSION_MINOR < 2)
     freerdp_channels_global_uninit();
+#endif

     if ( p_sys->p_block )
         block_Release( p_sys->p_block );



More information about the vlc-devel mailing list