Browse Source

lavc/videotoolboxenc: fix loadVTEncSymbols crash when symbol not found

Signed-off-by: Rick Kern <kernrj@gmail.com>
tags/n3.4
jerett Rick Kern 8 years ago
parent
commit
82a8724df2
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavcodec/videotoolboxenc.c

+ 3
- 3
libavcodec/videotoolboxenc.c View File

@@ -73,11 +73,11 @@ static struct{

#define GET_SYM(symbol, defaultVal) \
do{ \
CFStringRef cfstr = *(CFStringRef*)dlsym(RTLD_DEFAULT, #symbol); \
if(!cfstr) \
CFStringRef* handle = (CFStringRef*)dlsym(RTLD_DEFAULT, #symbol); \
if(!handle) \
compat_keys.symbol = CFSTR(defaultVal); \
else \
compat_keys.symbol = cfstr; \
compat_keys.symbol = *handle; \
}while(0)

static pthread_once_t once_ctrl = PTHREAD_ONCE_INIT;


Loading…
Cancel
Save