mirror of
https://github.com/google/liblc3.git
synced 2026-06-02 01:47:02 +00:00
tools/elc3: Use correct offset for pcm buffer padding
The address offset of the pcm buffer computed is in samples instead of bytes. This causes the last few bytes of the original pcm content to get corrupted with the padding bytes. Pass the number of bytes read instead of samples as the address offset.
This commit is contained in:
+1
-1
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
int nread = wave_read_pcm(fp_in, pcm_sbytes, nch, frame_samples, pcm);
|
||||
|
||||
memset(pcm + nread * nch, 0,
|
||||
memset(pcm + nread * nch * pcm_sbytes, 0,
|
||||
nch * (frame_samples - nread) * pcm_sbytes);
|
||||
|
||||
if (floorf(i * frame_us * 1e-6) > nsec) {
|
||||
|
||||
Reference in New Issue
Block a user