[asterisk-dev] unable to pass default attribute_data from codec_xyz.c to res_format_attr_xyz.c

Mohit Dhiman mohitdhiman736 at gmail.com
Tue Aug 27 05:40:31 CDT 2019


Hi,
I am trying to pass default data from codec_xyz.c to res_format_attr_xyz.c

what I did:

   - main/codec_builtin.c: ast_codec_builtin_init: made a call to
   CODEC_REGISTER_AND_CACHE(xyz)
   - codecs/codec_xyz.c: load_module: get the codec. xyz_codec =
   ast_codec_get()
   - codecs/codec_xyz.c: load_module: format =
   ast_format_create_named("xyz", xyz_codec)
   - codecs/codec_xyz.c: load_module: initialized struct xyz_attr in
   variable attr
   - codecs/codec_xyz.c: load_module: ast_format_set_attribute_data(format,
   attr);
   - codecs/codec_xyz.c: load_module: ast_format_cache_set(format);


problem is that attribute_data in callback format_generate_sdp_fmtp of
res_format_attr_xyz.c is NULL
and not what was initialized in codec/codec_xyz.c

can anyone help as what should be the right way to do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20190827/02244d86/attachment.html>


More information about the asterisk-dev mailing list