ulaw: fix encoded bytes calculation

Refs #49181

Change-Id: I3e7b0bc4a7c857e680fa6e589e438284b6c4db8a
This commit is contained in:
Tristan Matthews
2014-07-03 14:44:54 -04:00
parent a254b2d2f1
commit 382e84f4fc

View File

@ -62,8 +62,9 @@ class Ulaw : public sfl::AudioCodec {
const unsigned char *end = data +
std::min<size_t>(frameSize_, max_data_bytes);
for (; data < end; ++data, ++pcm)
*data = ULawEncode(*pcm);
unsigned char *tmp = data;
for (; tmp < end; ++tmp, ++pcm)
*tmp = ULawEncode(*pcm);
return end - data;
}