History

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.

Devin Heitmueller committed 9 years ago

Commit b6782a11 parent 3dc01221 file · +1 −1Browse files

Showing the changes to libavdevice/decklink_common.cpp (1 of 1 file). Show all

Unified · Split

libavdevice/decklink_common.cpp+1−1
@@ -84,7 +84,7 @@ static char *dup_cfstring_to_utf8(CFStringRef w) · 83 unmodified lines
84}84}
85#define DECKLINK_STR const __CFString *85#define DECKLINK_STR const __CFString *
86#define DECKLINK_STRDUP dup_cfstring_to_utf886#define DECKLINK_STRDUP dup_cfstring_to_utf8
87#define DECKLINK_FREE(s) free((void *) s)87#define DECKLINK_FREE(s) CFRelease(s)
88#define DECKLINK_BOOL bool88#define DECKLINK_BOOL bool
89#else89#else
90#define DECKLINK_STR const char *90#define DECKLINK_STR const char *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t