fix MixMonitor crash (issue #6321, probably others)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-01-22 17:47:13 +00:00
parent cea50c9247
commit 696922defe

View File

@@ -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;