History

avdevice/decklink_common: Fix Decklink for Mac

Georg Lippitsch committed 11 years ago

Commit 62ea5ae1 parent 97a27061 file · +10 −0Browse files

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

Unified · Split

libavdevice/decklink_common.cpp+10−0
@@ -70,6 +70,16 @@ static char *dup_wchar_to_utf8(wchar_t *w) · 69 unmodified lines
7070 #define DECKLINK_STR OLECHAR *
7171 #define DECKLINK_STRDUP dup_wchar_to_utf8
7272 #define DECKLINK_FREE(s) SysFreeString(s)
73+#elif __APPLE__
74+static char *dup_cfstring_to_utf8(CFStringRef w)
75+{
76+ char s[256];
77+ CFStringGetCString(w, s, 255, kCFStringEncodingUTF8);
78+ return av_strdup(s);
79+}
80+#define DECKLINK_STR const __CFString *
81+#define DECKLINK_STRDUP dup_cfstring_to_utf8
82+#define DECKLINK_FREE(s) free((void *) s)
7383 #else
7484 #define DECKLINK_STR const char *
7585 #define DECKLINK_STRDUP av_strdup

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