[FFmpeg-devel] [PATCH 2/3] Fix Decklink for Mac

Georg Lippitsch georg.lippitsch at gmx.at
Sun Jan 11 19:52:50 CET 2015


Am 11.01.2015, 17:22 Uhr, schrieb Ramiro Polla <ramiro.polla at gmail.com>:

> Is it not possible to get the string's real length? You could also try
> using CFStringGetCStringPtr() first.

Curiously, I was not able to find any method to get the real number of  
bytes required to store the string. There is  
CFStringGetMaximumSizeForEncoding, which usually returns a number much  
larger than actually required. And then there is CFStringGetLength, which  
is useless to determine the storage size for a variable length encoding.

Indeed, all these solution a rather ugly. Any hint from Mac developers on  
how to implement this correctly?

CFStringGetCStringPtr() always returned NULL in all my tests.


Thanks!

Georg


More information about the ffmpeg-devel mailing list