Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lippitsch <georg.lippitsch@gmx.at>2015-01-11 17:38:46 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-08 06:43:54 +0300
commit62ea5ae2b567a770e5e106493bcad59a9098cb8d (patch)
treeda125261b7ddcf28ec3ce45d71388051e4416de5 /libavdevice/decklink_common.cpp
parent97a27065c88c3486e46da1470a0161ce43890f3e (diff)
avdevice/decklink_common: Fix Decklink for Mac
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r--libavdevice/decklink_common.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 07e16516cf..82b8bdb585 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -70,6 +70,16 @@ static char *dup_wchar_to_utf8(wchar_t *w)
#define DECKLINK_STR OLECHAR *
#define DECKLINK_STRDUP dup_wchar_to_utf8
#define DECKLINK_FREE(s) SysFreeString(s)
+#elif __APPLE__
+static char *dup_cfstring_to_utf8(CFStringRef w)
+{
+ char s[256];
+ CFStringGetCString(w, s, 255, kCFStringEncodingUTF8);
+ return av_strdup(s);
+}
+#define DECKLINK_STR const __CFString *
+#define DECKLINK_STRDUP dup_cfstring_to_utf8
+#define DECKLINK_FREE(s) free((void *) s)
#else
#define DECKLINK_STR const char *
#define DECKLINK_STRDUP av_strdup