[FFmpeg-devel] [PATCH] libavdevice: fix compilation for Mac OS X 10.7-10.12, iOS < 11
Erik Bråthen Solem
erikbsolem at hotmail.com
Wed Aug 21 21:54:51 EEST 2024
I have very little experience with mailing lists, my apologies if this
reply does not end up where it is supposed to be.
The Apple developer docs say that AVMediaType is a struct, but it looks
seems that in reality it is typedef-ed to NSString*, just with an extra
specifier NS_EXTENSIBLE_STRING_ENUM. Thus the constants introduced in
10.7 are NSString* both before and after 10.13 and it would likely not
be a problem if this typedef were to be compiled in on 10.13+, but I
want to avoid it if possible.
I agree that *_MAX_ALLOWED is probably what I was looking for and
wrote a simple test program using the 10.12 and 10.13 SDKs to verify
that. Using AVMediaType and compiling with the 10.12 SDK fails.
Compiling it with the 10.13 succeeds and runs as expected on my 10.9
system. Compiling it with AVMediaType typedef-ed to NSString* and
SDK 10.12 also works as expected.
Thanks for putting me on the right track! I will try to submit a new
version of the patch as a reply to this thread. Please let me know
if I should submit it as a new thread instead.
More information about the ffmpeg-devel
mailing list