From e4f1e83b6582cd4602b6387f02882d72490b7854 Mon Sep 17 00:00:00 2001 From: Daeho Ro <40587651+daeho-ro@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:36:27 +0900 Subject: [PATCH] FaacEncoder: pass caller_size to faac_params_init() for faac >= 2.2 faac 2.2 bumped FAAC_VERSION_MAJOR and the library SONAME to 2 and added a caller_size argument to faac_params_init(). Pass sizeof(params) when FAAC_VERSION_MAJOR >= 2 and keep the one-argument call for faac 2.0 and 2.1. --- darkice/src/FaacEncoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/darkice/src/FaacEncoder.cpp b/darkice/src/FaacEncoder.cpp index 9fb147c..c53b8c3 100644 --- a/darkice/src/FaacEncoder.cpp +++ b/darkice/src/FaacEncoder.cpp @@ -114,7 +114,11 @@ FaacEncoder :: open ( void ) faac_params params; faac_status status; +#if FAAC_VERSION_MAJOR >= 2 + if ( (status = faac_params_init( ¶ms, sizeof( params))) < 0 ) { +#else if ( (status = faac_params_init( ¶ms)) < 0 ) { +#endif throw Exception(__FILE__, __LINE__, "error initializing faac parameters", faac_strerror(status));