diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index 7a66b459f973bac0ec7fa16c61a7531c8db06ca6..c08de587967e59b437df13bcc18fbe5c8c51ee76 100644
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -223,6 +223,7 @@ static int speextolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 		}
 #endif
 		pvt->samples += tmp->framesize;
+		pvt->datalen += 2 * tmp->framesize; /* 2 bytes/sample */
 		return 0;
 	}