Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Issue with swresample #2124
Description of the problem
I know, it's uncommon to report a bug, that is currently not a bug, but will be in the future. I regularly build HandBrake against the latest FFmpeg master to check if everything works as expected or something is broken. With the latest master I found some issues. First I thought its a FFmpeg regression, but I was told from FFmpeg devs, this is more likely a HandBrake bug.
FFmpeg commit a9fa6b8e025cd138f8c3ed4cfa6d568bd79d0123 introduces a check for invalid sample rates into swresample. This will break HandBrake, in the next big FFmpeg release (when ever this will be). The result is, every encoded file is lacking the audio stream.
I've attached the console output. I've already reported this to trac.ffmpeg.org as #7928.
I have no clue why this will break HandBrake, but thought it will be better to report it.
HandBrake version (e.g., 1.0.0)
Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)
macOS 10.14 Mojave (but will be true for every OS)
Error message text or screenshot
[SWR @ 0x11a44a000] Requested input sample rate 0 is invalid
HandBrake Activity Log (see https://handbrake.fr/docs/en/latest/help/activity-log.html)
Where that is being used, we are not actually changing the sample_rate. We are only changing other attributes like sample format or channel layout. So both in and out sample_rate were being left at their default of 0. This used to work just fine and probably still does if those error checks were disabled. They've basically made an API change.