mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 06:53:41 +00:00
Handle cases where a frame may have no data. (issue #9519 reported by dmb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2743,7 +2743,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
|
|||||||
ast_smoother_feed(rtp->smoother, _f);
|
ast_smoother_feed(rtp->smoother, _f);
|
||||||
}
|
}
|
||||||
|
|
||||||
while((f = ast_smoother_read(rtp->smoother)))
|
while((f = ast_smoother_read(rtp->smoother)) && (f->data))
|
||||||
ast_rtp_raw_write(rtp, f, codec);
|
ast_rtp_raw_write(rtp, f, codec);
|
||||||
} else {
|
} else {
|
||||||
/* Don't buffer outgoing frames; send them one-per-packet: */
|
/* Don't buffer outgoing frames; send them one-per-packet: */
|
||||||
@@ -2752,6 +2752,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
|
|||||||
} else {
|
} else {
|
||||||
f = _f;
|
f = _f;
|
||||||
}
|
}
|
||||||
|
if (f->data)
|
||||||
ast_rtp_raw_write(rtp, f, codec);
|
ast_rtp_raw_write(rtp, f, codec);
|
||||||
if (f != _f)
|
if (f != _f)
|
||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
|
Reference in New Issue
Block a user