]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
rtp_engine: Init a format-attribute module to its RFC defaults. 94/1594/1
authorAlexander Traud <pabstraud@compuserve.com>
Tue, 10 Nov 2015 15:29:35 +0000 (16:29 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Tue, 10 Nov 2015 15:29:58 +0000 (16:29 +0100)
Previously, format-attribute modules relied on an existing fmtp line in SDP
negotiation. However, fmtp is optional for several formats like the Opus Codec.
Now, the format-attribute module is called with an empty fmtp, which allows the
module to initialise itself to RFC defaults. Furthermore now, Asterisk is able
to differentiate between internally and externally created formats.

ASTERISK-25537 #close

Change-Id: I28f680cef7fdf51c0969ff8da71548edad72ec52

main/rtp_engine.c

index 944c477a6ad163bd7dc155b6bd0c9e60885b3d8c..422a2975029de68a2796e4882cc547e60313a279 100644 (file)
@@ -621,6 +621,8 @@ int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs,
                        ast_format_set(&type->format, AST_FORMAT_G726_AAL2, 0);
                }
 
+               ast_format_sdp_parse(&type->format, "");
+
                if (instance && instance->engine && instance->engine->payload_set) {
                        instance->engine->payload_set(instance, pt, type->asterisk_format, &type->format, type->rtp_code);
                }