Skip to content

vlcrs-macros: module: fix int usage in variadics

On the C side, the category is read as an int type:

        /* src/modules/entry.c */
        case VLC_CONFIG_CREATE:
        {
            int type = va_arg (ap, int);

On the Rust side, it is then incorrect to inject an i64:

        vlc_set(
                opaque,
                ::std::ptr::null_mut(),
                ::vlcrs_core::plugin::ModuleProperties::CONFIG_CREATE as _,
                // incorrect
                ::vlcrs_core::plugin::ConfigModule::SUBCATEGORY as i64,
                &mut config as *mut *mut ::vlcrs_core::plugin::vlc_param,
        )

It fixes such ABI error, and in particular a crash on android armv7.

Merge request reports

Loading