Skip to content

Fixes compatibility with newer ffmpeg versions.#746

Merged
tsjost merged 3 commits intorwengine:mainfrom
Dygear:ffmpeg5-fixes
Apr 20, 2024
Merged

Fixes compatibility with newer ffmpeg versions.#746
tsjost merged 3 commits intorwengine:mainfrom
Dygear:ffmpeg5-fixes

Conversation

@Dygear
Copy link
Copy Markdown
Contributor

@Dygear Dygear commented Nov 1, 2023

Fixes Error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers.

Building on macOS Sonoma 14.1 (23B74), using a M2 Max in an arch -x86_64 zsh environment.

Fixes the error by using the auto keyword to infer the correct type.

It should be noted that this might not be the best way to handle this. Indeed right after this, the compiler notes that the codec variable is never actually used in either location. Perhaps the author of the original commit for this line, Filip Gawin, could explain what the intention was with this line. Removing this line completely also fixes the error, but I'm unable to tell if it has side effects.

Fixes `Error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers`.
@rolandpoulter
Copy link
Copy Markdown

+1
had the same error in the description and this fixed it

@Dygear
Copy link
Copy Markdown
Contributor Author

Dygear commented Jan 18, 2024

Ok took your suggestion @Lihis, hopefully this can be closed now once merged.

Copy link
Copy Markdown
Collaborator

@Lihis Lihis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good

Co-authored-by: Tomi Lähteenmäki <lihis@lihis.net>
@Dygear
Copy link
Copy Markdown
Contributor Author

Dygear commented Jan 19, 2024

@Lihis Done

@tsjost tsjost merged commit f10a5a8 into rwengine:main Apr 20, 2024
@tsjost
Copy link
Copy Markdown
Member

tsjost commented Apr 20, 2024

Thanks for the fix and review!

This fixes the build error, but Start new game soft-hangs with audio still playing; not yet sure if this also has something to do with newer ffmpeg, or just something weird with my machine.

@Lihis
Copy link
Copy Markdown
Collaborator

Lihis commented Apr 21, 2024

Thanks for the fix and review!

This fixes the build error, but Start new game soft-hangs with audio still playing; not yet sure if this also has something to do with newer ffmpeg, or just something weird with my machine.

@tsjost at least the PR #747 fixes the hang for me.

@Dygear Dygear deleted the ffmpeg5-fixes branch April 22, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants