[Asterisk-code-review] format: Register format-attribute module with cached formats. (asterisk[master])
Alexander Traud
asteriskteam at digium.com
Fri Nov 13 02:37:15 CST 2015
Alexander Traud has posted comments on this change.
Change subject: format: Register format-attribute module with cached formats.
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.asterisk.org/#/c/1600/2/main/format.c
File main/format.c:
Line 261: if (!interface) {
: struct format_interface *format_interface = ao2_find(interfaces, format2->codec->name, OBJ_SEARCH_KEY);
: if (format_interface) {
: interface = format_interface->interface;
: ao2_ref(format_interface, -1);
: }
: }
> You don't need to do this twice. The codec can't differ between them.
Mhm. I thought about this a bit longer. Actually, I do not need to change compare(.) at all because the local and the remote ast_format are involved. One might be cached (and not have an interface attached). However, the other has. or stated differently: I do not face this situation at all. Therefore, I do not add this change and reduce the patch to generate(.) and get(.). Especially, because compare is called very, very often even while being connected.
--
To view, visit https://gerrit.asterisk.org/1600
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1ea1f0483e5261e2a050112e4ebdfc22057d1354
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list