Mercurial > mplayer.hg
changeset 26988:21ce55d8dde0
Fix channel order for libvorbis decoder, original patched by Nicolas George.
author | ulion |
---|---|
date | Sat, 07 Jun 2008 13:04:53 +0000 |
parents | d3a0f537dbe8 |
children | 1c6b9d0c63aa |
files | libmpcodecs/ad_libvorbis.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_libvorbis.c Sat Jun 07 12:57:36 2008 +0000 +++ b/libmpcodecs/ad_libvorbis.c Sat Jun 07 13:04:53 2008 +0000 @@ -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 @@ // 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;