aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 777432940..56d06978d 100644
--- a/channel.c
+++ b/channel.c
@@ -3830,7 +3830,7 @@ static void copy_data_from_queue(struct ast_channel_spy_queue *queue, short *buf
}
tocopy = (f->samples > samples) ? samples : f->samples;
- bytestocopy = ast_codec_get_len(queue->format, samples);
+ bytestocopy = ast_codec_get_len(queue->format, tocopy);
memcpy(buf, f->data, bytestocopy);
samples -= tocopy;
buf += tocopy;