diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-24 19:30:45 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-24 19:30:45 +0000 |
commit | 5ba2ef3659ba663f3c9522d8b0cbd46ddf6e4022 (patch) | |
tree | c6d5087db5f4543b797be84a8c91076f28ca3b8a | |
parent | c0e8ce23151318320f0fd60507961ae4cd698309 (diff) |
Merged revisions 265273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r265273 | dvossel | 2010-05-24 11:10:09 -0500 (Mon, 24 May 2010) | 2 lines
fixes segfault when using generic plc
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@265364 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/channel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index 426e6a7d9..a1339fcf0 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3502,6 +3502,12 @@ static void adjust_frame_for_plc(struct ast_channel *chan, struct ast_frame *fra int num_new_samples = frame->samples; struct plc_ds *plc = datastore->data; + + /* If this audio frame has no samples to fill in ignore it */ + if (!num_new_samples) { + return; + } + /* First, we need to be sure that our buffer is large enough to accomodate * the samples we need to fill in. This will likely only occur on the first * frame we write. |