openrw icon indicating copy to clipboard operation
openrw copied to clipboard

Fixes compatibility with newer ffmpeg versions.

Open Dygear opened this issue 2 years ago • 3 comments

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.

Dygear avatar Nov 01 '23 05:11 Dygear

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

rolandpoulter avatar Nov 06 '23 00:11 rolandpoulter

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

Dygear avatar Jan 18 '24 22:01 Dygear

@Lihis Done

Dygear avatar Jan 19 '24 06:01 Dygear

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 avatar Apr 20 '24 17:04 tsjost

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.

Lihis avatar Apr 21 '24 05:04 Lihis