Index: channel.c =================================================================== --- channel.c (revision 8356) +++ channel.c (working copy) @@ -3833,7 +3833,7 @@ } 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;