<div>Hi guys,</div><div><br></div><div>Please help explain why the int_value of the pa_json_object structure needs to be declared as int64_t.</div><div><br></div><div><div>./src/pulsecore/json.c:</div><div><br></div><div>struct pa_json_object {</div><div>    pa_json_type type;</div><div><br></div><div>    union {</div><div>        int64_t int_value;</div><div>        double double_value;</div><div>        bool bool_value;</div><div>        char *string_value;</div><div>        pa_hashmap *object_values; /* name -> object */</div><div>        pa_idxset *array_values; /* objects */</div><div>    };</div><div>};</div></div><div><br></div><div><div>Can I change "int64_t int_value;" to "int int_value;"?</div><div>In the ./src/pulse/format.c file, the function pa_json_object_get_int</div><div>is called multiple times, converting int64_t to int.</div></div><div><br></div><div>./src/pulse/format.c:</div><div><br></div><div>int pa_format_info_get_prop_int(const pa_format_info *f, const char *key, int *v) {</div><div>    const char *str;</div><div>    pa_json_object *o;</div><div><br></div><div>    pa_assert(f);</div><div>    pa_assert(key);</div><div>    pa_assert(v);</div><div><br></div><div>    str = pa_proplist_gets(f->plist, key);</div><div>    if (!str)</div><div>        return -PA_ERR_NOENTITY;</div><div><br></div><div>    o = pa_json_parse(str);</div><div>    if (!o) {</div><div>        pa_log_debug("Failed to parse format info property '%s'.", key);</div><div>        return -PA_ERR_INVALID;</div><div>    }</div><div><br></div><div>    if (pa_json_object_get_type(o) != PA_JSON_TYPE_INT) {</div><div>        pa_log_debug("Format info property '%s' type is not int.", key);</div><div>        pa_json_object_free(o);</div><div>        return -PA_ERR_INVALID;</div><div>    }</div><div><br></div><div>    *v = pa_json_object_get_int(o);</div><div>    pa_json_object_free(o);</div><div><br></div><div>    return 0;</div><div>}</div><div><br></div><div>Thanks,</div><div>Chengyi</div><div><br></div><div><includetail><!--<![endif]--></includetail></div>