[MPlayer-dev-eng] [PATCH] Fix libvorbis decoder output channel order
Nicolas George
nicolas.george at normalesup.org
Sun Jun 1 12:50:37 CEST 2008
Hi.
The attached patch fixes output channel order for the libvorbis decoder.
Regards,
--
Nicolas George
-------------- next part --------------
diff --git a/libmpcodecs/ad_libvorbis.c b/libmpcodecs/ad_libvorbis.c
index 900dc87..c4ded1f 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 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 && sh->channels >= 5) {
+ reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_VORBIS_DEFAULT,
+ AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
+ sh->channels,
+ len / sh->samplesize, sh->samplesize);
+ }
return len;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080601/5c83b4b0/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list