deskutils/calibre: Fix build with build with FFmpeg 9.0
Import upstream patch to fix the issue.
While here, fix some portclippy/portfmt warnings.
PR: 297387
Obtained from: https://github.com/kovidgoyal/calibre/commit/49af1f0904e00351ffbf9ad430a37bfe66226bae