mac-videtoolbox: Use correct size for system representation CFStrings
This commit is contained in:
parent
a352f0fdd8
commit
097e9ccecf
1 changed files with 5 additions and 4 deletions
|
|
@ -1383,10 +1383,11 @@ bool obs_module_load(void)
|
|||
CFDictionaryRef encoder_dict =
|
||||
CFArrayGetValueAtIndex(encoder_list, i);
|
||||
|
||||
#define VT_DICTSTR(key, name) \
|
||||
CFStringRef name##_ref = CFDictionaryGetValue(encoder_dict, key); \
|
||||
CFIndex name##_len = CFStringGetLength(name##_ref); \
|
||||
char *name = bzalloc(name##_len + 1); \
|
||||
#define VT_DICTSTR(key, name) \
|
||||
CFStringRef name##_ref = CFDictionaryGetValue(encoder_dict, key); \
|
||||
CFIndex name##_len = \
|
||||
CFStringGetMaximumSizeOfFileSystemRepresentation(name##_ref); \
|
||||
char *name = bzalloc(name##_len + 1); \
|
||||
CFStringGetFileSystemRepresentation(name##_ref, name, name##_len);
|
||||
|
||||
CMVideoCodecType codec_type = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue