List Info

Thread: Fix libvorbis decoder output channel order




Fix libvorbis decoder output channel order
country flaguser name
France
2008-06-01 05:50:37
Hi.

The attached patch fixes output channel order for the
libvorbis decoder.

Regards,

-- 
  Nicolas George

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;

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-engmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-d
ev-eng
Re: Fix libvorbis decoder output channel order
user name
2008-06-07 08:05:54
2008/6/1 Nicolas George <nicolas.georgenormalesup.org>:
> Hi.
>
> The attached patch fixes output channel order for the
libvorbis decoder.

thanks, commited with a slight difference.

-- 
Ulion
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-engmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-d
ev-eng

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )