mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1219,12 +1219,11 @@ static struct ast_frame *mgcp_rtp_read(struct mgcp_subchannel *sub)
|
||||
{
|
||||
/* Retrieve audio/etc from channel. Assumes sub->lock is already held. */
|
||||
struct ast_frame *f;
|
||||
static struct ast_frame null_frame = { AST_FRAME_NULL, };
|
||||
|
||||
f = ast_rtp_read(sub->rtp);
|
||||
/* Don't send RFC2833 if we're not supposed to */
|
||||
if (f && (f->frametype == AST_FRAME_DTMF) && !(sub->parent->dtmfmode & MGCP_DTMF_RFC2833))
|
||||
return &null_frame;
|
||||
return &ast_null_frame;
|
||||
if (sub->owner) {
|
||||
/* We already hold the channel lock */
|
||||
if (f->frametype == AST_FRAME_VOICE) {
|
||||
|
Reference in New Issue
Block a user