[vlc-commits] Decklink: Use FromCFString on darwin

Marvin Scholz git at videolan.org
Sat Oct 20 21:08:29 CEST 2018


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Oct 20 20:46:18 2018 +0200| [7ef4da473a6fe6d7e22841828f086dfdae380344] | committer: Marvin Scholz

Decklink: Use FromCFString on darwin

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ef4da473a6fe6d7e22841828f086dfdae380344
---

 modules/access/vlc_decklink.h | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/access/vlc_decklink.h b/modules/access/vlc_decklink.h
index 854caf734f..4b59557996 100644
--- a/modules/access/vlc_decklink.h
+++ b/modules/access/vlc_decklink.h
@@ -35,14 +35,10 @@
 #ifdef _WIN32
 #error FIXME: Win32 is known to not work for decklink.
 #elif defined(__APPLE__)
-static char *dup_cfstring_to_utf8(CFStringRef w)
-{
-    char s[256];
-    CFStringGetCString(w, s, 255, kCFStringEncodingUTF8);
-    return strdup(s);
-}
+#include <vlc_common.h>
+#include <vlc_charset.h>
 #define DECKLINK_STR    const __CFString *
-#define DECKLINK_STRDUP dup_cfstring_to_utf8
+#define DECKLINK_STRDUP(s) FromCFString(s, kCFStringEncodingUTF8)
 #define DECKLINK_FREE(s) CFRelease(s)
 #else
 #define DECKLINK_STR    const char *



More information about the vlc-commits mailing list