[MacPorts] #70519: ffmpeg7 @7.0.1 does not build on macOS 10.12 with Xcode 9.2 due to "AVMediaType" type conflict

MacPorts noreply at macports.org
Thu Aug 22 18:43:05 UTC 2024


#70519: ffmpeg7 @7.0.1 does not build on macOS 10.12 with Xcode 9.2 due to
"AVMediaType" type conflict
----------------------+----------------------
  Reporter:  andlabs  |      Owner:  mascguy
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:
      Port:  ffmpeg7  |
----------------------+----------------------

Comment (by erikbs):

 I think your analysis is correct. Unaware of this ticket I arrived at the
 same conclusion. In fact, in the 10.13 SDK, `AVMediaType` is typedef-ed to
 `NSString*` (with some extra specifier that does not seem to matter). The
 constants themselves (`AVMediaTypeVideo` etc.) were introduced in 10.7,
 where they were declared as `NSString*`. When the `AVMediaType` alias was
 introduced, the constant definitions were updated to use the new type
 alias. Ffmpeg7 fails because `AVMediaType` is not defined. Rather than
 patching the function to take an `NSString*` as parameter I created a
 patch that defines `AVMediaType` as an alias for `NSString*` (without the
 extra specifier) when targeting the OS X 10.12 SDK and older.

 I have submitted the patch to FFmpeg and also opened a PR to have it
 included in MacPorts until the issue is fixed upstream:
 https://github.com/macports/macports-ports/pull/25416

-- 
Ticket URL: <https://trac.macports.org/ticket/70519#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list