Fixes a pretty bad stereo bug in test_opus
This commit is contained in:
parent
86dd98409f
commit
0c08a99a79
1 changed files with 3 additions and 3 deletions
|
@ -339,9 +339,9 @@ int main(int argc, char *argv[])
|
||||||
if (feof(fin))
|
if (feof(fin))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
err = fread(in, sizeof(short), frame_size*channels, fin);
|
err = fread(in, sizeof(short)*channels, frame_size, fin);
|
||||||
curr_read = err;
|
curr_read = err;
|
||||||
if (curr_read < frame_size*channels)
|
if (curr_read < frame_size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=curr_read*channels;i<frame_size*channels;i++)
|
for (i=curr_read*channels;i<frame_size*channels;i++)
|
||||||
|
@ -384,7 +384,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
if (output_samples>0)
|
if (output_samples>0)
|
||||||
{
|
{
|
||||||
fwrite(out+skip, sizeof(short), output_samples-skip*channels, fout);
|
fwrite(out+skip, sizeof(short)*channels, output_samples-skip, fout);
|
||||||
skip = 0;
|
skip = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue