res_format_attr_opus: Fix fmtp generation.
authorMark Michelson <mmichelson@digium.com>
Wed, 16 Nov 2016 21:42:39 +0000 (15:42 -0600)
committerMark Michelson <mmichelson@digium.com>
Wed, 16 Nov 2016 21:49:04 +0000 (16:49 -0500)
commitdc8f99ee27bd9c2ed2524bf01825ac65234f59ba
tree3e07efd45e0c4f060a1b3e8379e29d2c505cacb1
parent732ab6a045e1d4de5bf7a8256376dbe24406eed6
res_format_attr_opus: Fix fmtp generation.

res_format_attr_opus assumed that the string being passed into it was
empty. It tried to determine if the only thing it had written was

a=fmtp:<num>

And if it had, it would reset the string. Its calculation was off when
working with chan_sip, though. chan_sip passes the entire built SDP
rather than an empty string. This resulted in always putting an empty
fmtp line in the SDP.

ASTERISK-26520 #close
Reported by scgm11

Change-Id: Ib2e8712d26a47067e5f36d5973577added01dbb5
res/res_format_attr_opus.c