Skip to content
Snippets Groups Projects
Commit b6782a19 authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Marton Balint
Browse files

avdevice/decklink: Fix segfault when running -list_devices on OSX


The string is allocated with CFStringGetCString but was being
deallocated with free(), which would intermittently result in
a segmentation fault.  Use the correct function for freeing the
allocated CFString.

Signed-off-by: default avatarDevin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: default avatarMarton Balint <cus@passwd.hu>
parent 3dc01223
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,7 @@ static char *dup_cfstring_to_utf8(CFStringRef w) ...@@ -84,7 +84,7 @@ static char *dup_cfstring_to_utf8(CFStringRef w)
} }
#define DECKLINK_STR const __CFString * #define DECKLINK_STR const __CFString *
#define DECKLINK_STRDUP dup_cfstring_to_utf8 #define DECKLINK_STRDUP dup_cfstring_to_utf8
#define DECKLINK_FREE(s) free((void *) s) #define DECKLINK_FREE(s) CFRelease(s)
#define DECKLINK_BOOL bool #define DECKLINK_BOOL bool
#else #else
#define DECKLINK_STR const char * #define DECKLINK_STR const char *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment