New upstream version 23.2.1+dfsg1

This commit is contained in:
Simon Chopin 2019-07-27 14:47:10 +02:00
parent cdc9a9fc87
commit b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions

View file

@ -1,22 +1,17 @@
#include "../platform.hpp"
#include <util/apple/cfstring-utils.h>
bool DeckLinkStringToStdString(decklink_string_t input, std::string& output)
{
const CFStringRef string = static_cast<CFStringRef>(input);
const CFIndex length = CFStringGetLength(string);
const CFIndex maxLength = CFStringGetMaximumSizeForEncoding(length,
kCFStringEncodingASCII) + 1;
char * const buffer = new char[maxLength];
char *buffer = cfstr_copy_cstr(string, kCFStringEncodingASCII);
const bool result = CFStringGetCString(string, buffer, maxLength,
kCFStringEncodingASCII);
if (result)
if (buffer)
output = std::string(buffer);
delete[] buffer;
bfree(buffer);
CFRelease(string);
return result;
return (buffer != NULL);
}