diff options
Diffstat (limited to 'libmpcodecs/ad_libvorbis.c')
-rw-r--r-- | libmpcodecs/ad_libvorbis.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/ad_libvorbis.c b/libmpcodecs/ad_libvorbis.c index d8e4de99c7..eebcd298fe 100644 --- a/libmpcodecs/ad_libvorbis.c +++ b/libmpcodecs/ad_libvorbis.c @@ -7,6 +7,7 @@ #include "config.h" #include "ad_internal.h" +#include "libaf/reorder_ch.h" static const 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; |