Skip to content
Snippets Groups Projects
Commit 0c08a99a authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fixes a pretty bad stereo bug in test_opus

parent 86dd9840
No related branches found
No related tags found
No related merge requests found
...@@ -339,9 +339,9 @@ int main(int argc, char *argv[]) ...@@ -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[]) ...@@ -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;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment