Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix build errors in media_utils.cpp #13034

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

shinra-electric
Copy link
Contributor

@shinra-electric shinra-electric commented Dec 9, 2022

Changes AVCodec* to a constant rather than a variable in two places.

Building on macOS for Arm with Xcode 14.1 would fail with the following errors:

/Users/XXXX/Downloads/rpcs3/rpcs3/util/media_utils.cpp:702:17: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
                        if (AVCodec* encoder = avcodec_find_encoder(used_codec); !!encoder)
                                     ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/XXXX/Downloads/rpcs3/rpcs3/util/media_utils.cpp:727:19: error: cannot initialize a variable of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
                                        if (AVCodec* encoder = avcodec_find_encoder(codec->id); !!encoder)
                                                     ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Allows RPCS3 to build on macOS again

Testing:
1: Build on macOS (Edit: ARM and Intel)
2: Check that recording still works.

Should be checked by @Megamouse as they wrote the initial code.

...rather than a variable. 

Allows RPCS3 to build on macOS again (Xcode 14.1)
@MSuih MSuih added the OS: macOS label Dec 9, 2022
@Nekotekina Nekotekina merged commit bf37087 into RPCS3:master Dec 9, 2022
@shinra-electric shinra-electric deleted the fix_build branch December 9, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants