aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-29 16:46:49 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-29 16:46:49 +0000
commit254ab3e0b82bde486c7ecac95d7d9eae4d6d238d (patch)
tree927d0e836a4448f623610722b98ac9ae09190053 /main
parenta6bb4b17967055df269ba5e1ef8d041236d26965 (diff)
Merged revisions 66437 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r66437 | file | 2007-05-29 12:44:34 -0400 (Tue, 29 May 2007) | 2 lines Handle cases where a frame may have no data. (issue #9519 reported by dmb) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66438 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 71058df6d..e64ab12ea 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2862,7 +2862,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_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);
} else {
/* Don't buffer outgoing frames; send them one-per-packet: */
@@ -2870,7 +2870,8 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
f = ast_frdup(_f); /*! \bug XXX this might never be free'd. Why do we do this? */
else
f = _f;
- ast_rtp_raw_write(rtp, f, codec);
+ if (f->data)
+ ast_rtp_raw_write(rtp, f, codec);
if (f != _f)
ast_frfree(f);
}