[MPlayer-cvslog] r27020 - trunk/libmpcodecs/ad_libvorbis.c

ulion subversion at mplayerhq.hu
Sat Jun 7 15:04:53 CEST 2008


Author: ulion
Date: Sat Jun  7 15:04:53 2008
New Revision: 27020

Log:
Fix channel order for libvorbis decoder, original patched by Nicolas George.


Modified:
   trunk/libmpcodecs/ad_libvorbis.c

Modified: trunk/libmpcodecs/ad_libvorbis.c
==============================================================================
--- trunk/libmpcodecs/ad_libvorbis.c	(original)
+++ trunk/libmpcodecs/ad_libvorbis.c	Sat Jun  7 15:04:53 2008
@@ -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,u
 //          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;



More information about the MPlayer-cvslog mailing list