mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
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:
parent
2e7dc8d9fb
commit
7b17a4e2c4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user