aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 15dba8684..0f3413362 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2938,6 +2938,11 @@ 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.