lavc/videotoolboxenc: fix symbol linking
authorRick Kern <kernrj@gmail.com>
Wed, 1 Mar 2017 15:39:13 +0000 (10:39 -0500)
committerRick Kern <kernrj@gmail.com>
Wed, 1 Mar 2017 15:43:08 +0000 (10:43 -0500)
Removes explicit reference to symbols and fixes dereferencing issue.

Signed-off-by: Rick Kern <kernrj@gmail.com>
libavcodec/videotoolboxenc.c

index fe64250..005f5d6 100644 (file)
@@ -74,11 +74,11 @@ static struct{
 
 #define GET_SYM(symbol, defaultVal)                                     \
 do{                                                                     \
-    CFStringRef cfstr = dlsym(RTLD_DEFAULT, #symbol);                   \
+    CFStringRef cfstr = *(CFStringRef*)dlsym(RTLD_DEFAULT, #symbol);    \
     if(!cfstr)                                                          \
         compat_keys.symbol = CFSTR(defaultVal);                         \
     else                                                                \
-        compat_keys.symbol = symbol;                                    \
+        compat_keys.symbol = cfstr;                                     \
 }while(0)
 
 static pthread_once_t once_ctrl = PTHREAD_ONCE_INIT;