aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-21 07:22:04 +0000
committerGravatar nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-21 07:22:04 +0000
commit8c7286fec075e2636781f118350263dfd53c006f (patch)
treec21de5aec86678e5d82c0d0ace53b579f6cad3bc /libmpcodecs
parentb46fa6a150837c5345d7da4652d29843343144f3 (diff)
fixed wrong deinterleaving of channels
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14551 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ae_toolame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpcodecs/ae_toolame.c b/libmpcodecs/ae_toolame.c
index a911b224d6..d717f6943f 100644
--- a/libmpcodecs/ae_toolame.c
+++ b/libmpcodecs/ae_toolame.c
@@ -119,8 +119,8 @@ int mpae_encode_toolame(mpae_toolame_ctx *ctx, uint8_t *dest, int nsamples, void
buffer = (uint16_t *) src;
for(i = 0; i < nsamples; i++)
{
- ctx->left_pcm[i] = buffer[2 * i];
- ctx->right_pcm[i] = buffer[2 * i + (ctx->channels - 1)];
+ ctx->left_pcm[i] = buffer[ctx->channels * i];
+ ctx->right_pcm[i] = buffer[(ctx->channels * i) + (ctx->channels - 1)];
}
toolame_encode_buffer(ctx->toolame_ctx, ctx->left_pcm, ctx->right_pcm, nsamples, dest, max_size, &ret_size);