projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a32d94e
)
Be more persistent in getting the media path key.
author
Carl Hetherington
<cth@carlh.net>
Thu, 20 Jan 2022 11:04:49 +0000
(12:04 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 20 Jan 2022 11:04:49 +0000
(12:04 +0100)
src/lib/cross_osx.cc
patch
|
blob
|
history
diff --git
a/src/lib/cross_osx.cc
b/src/lib/cross_osx.cc
index 2dc9b2702b006044f8d384e450f6877753ccc4c3..7e5fdacdc5f4c233b3848d5d2424e3845c524100 100644
(file)
--- 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);