Commit ba1d4198 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout: fix non-optimized aout_ChannelReorder() variant

parent 1fe85541
...@@ -322,13 +322,13 @@ do { \ ...@@ -322,13 +322,13 @@ do { \
default: default:
{ {
unsigned size = aout_BitsPerSample( fourcc ) / 8; unsigned size = aout_BitsPerSample( fourcc ) / 8;
const size_t frames = bytes / size; const size_t frames = bytes / (size * channels);
unsigned char *buf = ptr; unsigned char *buf = ptr;
assert( bytes != 0 ); assert( bytes != 0 );
for( size_t i = 0; i < frames; i++ ) for( size_t i = 0; i < frames; i++ )
{ {
unsigned char tmp[AOUT_CHAN_MAX * bytes]; unsigned char tmp[AOUT_CHAN_MAX * size];
for( size_t j = 0; j < channels; j++ ) for( size_t j = 0; j < channels; j++ )
memcpy( tmp + size * chans_table[j], buf + size * j, size ); memcpy( tmp + size * chans_table[j], buf + size * j, size );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment