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
FFmpeg: Support FFmpeg 5.0 #2434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The consts should be fine if they don't throw warnings in older versions. Can you check on older FFmpegs, e.g. the one in bionic or xenial? Also, what functions are passed these as void*?
Thank you for the speedy review!
Same set of warnings on Debian bullseye (FFmpeg 4.3), Ubuntu bionic (FFmpeg 3.4), and xenial (FFmpeg 2.8):
Looks like just |
Add an explicit cast to |
Done. Also added a cast to remove the const on the second argument to avformat_alloc_output_context2, which silences the other warning I pasted above (ffmpeg-encoder.c:280). Fingers crossed that's what you would have wanted. Now compiling without warnings on 5.0 and 4.4, |
Thank you! |
Hello,
Debian's FFmpeg maintainers reported that mgba fails to compile using the newly released FFmpeg 5.0.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004768
I have compiled, run
mgba-cinema
, and briefly tested video and GIF encoding with these changes on Debian unstable, with both FFmpeg 4.4 and 5.0.I'm not sure about all the
const
additions. The FFmpeg 5.0 APIs returnconst
pointers, but there are places with both versions where the pointers are passed to functions takingvoid *
, which of course causes a new warning. I don't really know what's less bad here; at leastconst
makes sure mGBA itself is sane?