-
Notifications
You must be signed in to change notification settings - Fork 98
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
Fix CI, fix or workaround build errors pre-FFmpeg 6.0 #187
Conversation
Couple more offers of help, if they're desirable:
|
- Restore the channel layout implementation from before bdb9f76 - Some channel layout functions are kept, some newer ones currently disabled on older FFMPEG as need more work to implement.
The ChapterId argument changed from i32 to i64 in FFMPEG 5.0, so expose this with a ChapterId alias.
A number of pointers were made 'const' in FFMPEG 5.0. This is a fairly clunky way to handle these, maybe there's a better way?
Before the nb_inputs/nb_outputs fields, the array is NULL-terminated and need to call a function to get the number of entries.
- time_base field missing - duration field available as pkt_duration I think (the newer versions deprecate pkt_duration for duration)..
- ffmpeg 4.4 on Ubuntu 22.04 (Jammy) - ffmpeg 6.1 on Ubuntu 24.04 (Noble)
Forgot this repo uses tabs not spaces. Have fixed the most obvious indentation fails, happy to go back and tabify the rest if it looks like this PR is going to be of use. 😁 |
Thanks for the PR! BTW, Rust doesn't care whether you use |
No worries! Would it be of any use if I submit PRs for the other stuff i mentioned, and/or to use rustfmt? Happy to do a bit of janitorial work but also don't want to be a pain. :)
Right, thanks for pointing this out. I'm very familiar with how this works in C but less confident with unsafe Rust. I was worried that a clippy lint might pop up saying "you don't need the I'll submit another PR to shrink some of these back down to a plain |
When you're changing things, it's best to follow what https://lib.rs/crates/ffmpeg-next is doing to make it easier to copy patches and avoid redundant work. Unfortunately all ffmpeg wrappers for Rust are cursed and have very unresponsive maintainers (I can only merge stuff here, but can't release it). |
Thanks for the pointers. I had missed that the zmwangx fork has been quite active of late, maybe I should switch focus to there as well (while noting it's also in maintenance mode). |
I got a bit carried away here, hopefully it's of some use. :)
All in separate commits.
I was able to run the
transcode-x264
example under Ubuntu 22.04 (FFmpeg 4.4) but I have not done any additional testing. It's likely many other things are broken on earlier FFmpeg, but building is a first step to fixing. 😁