Fix channel order for libvorbis decoder, original patched by Nicolas George.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27020 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2008-06-07 13:04:53 +00:00
parent 2e7dc8d9fb
commit 7b17a4e2c4
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "config.h"
#include "ad_internal.h"
#include "libaf/reorder_ch.h"
static ad_info_t info =
{
@ -316,6 +317,12 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
// if (!samples) break; // why? how?
}
if (len > 0 && ov->vi.channels >= 5) {
reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_VORBIS_DEFAULT,
AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
ov->vi.channels, len / sh->samplesize,
sh->samplesize);
}
return len;