From: Carl Hetherington Date: Thu, 20 Jan 2022 11:04:49 +0000 (+0100) Subject: Be more persistent in getting the media path key. X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=6dca08ace0dc76780be499d122b93a11a12d9af1 Be more persistent in getting the media path key. --- diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index 2dc9b2702..7e5fdacdc 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -320,10 +320,15 @@ analyse_media_path (CFDictionaryRef& description) return {}; } + char buffer[256]; auto path_key_cstr = CFStringGetCStringPtr((CFStringRef) str, kCFStringEncodingUTF8); if (!path_key_cstr) { - LOG_DISK_NC("There is no MediaPathKey (no cstring)"); - return {}; + if (CFStringGetCString((CFStringRef) str, buffer, 256, kCFStringEncodingUTF8)) { + path_key_cstr = buffer; + } else { + LOG_DISK_NC("There is no MediaPathKey (no cstring)"); + return {}; + } } string path(path_key_cstr);