[vlc-commits] aout: fix non-optimized aout_ChannelReorder() variant
Rémi Denis-Courmont
git at videolan.org
Fri Apr 12 19:12:37 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Apr 12 20:09:36 2013 +0300| [ba1d41988d920e5fc767e69d5d3d62b26f55579d] | committer: Rémi Denis-Courmont
aout: fix non-optimized aout_ChannelReorder() variant
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba1d41988d920e5fc767e69d5d3d62b26f55579d
---
src/audio_output/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index 2bc5437..c725ca5 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -322,13 +322,13 @@ do { \
default:
{
unsigned size = aout_BitsPerSample( fourcc ) / 8;
- const size_t frames = bytes / size;
+ const size_t frames = bytes / (size * channels);
unsigned char *buf = ptr;
assert( bytes != 0 );
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++ )
memcpy( tmp + size * chans_table[j], buf + size * j, size );
More information about the vlc-commits
mailing list