[MPlayer-cvslog] r26164 - in trunk: libaf/reorder_ch.c libaf/reorder_ch.h libmpcodecs/ad_ffmpeg.c

ulion subversion at mplayerhq.hu
Wed Mar 5 03:46:50 CET 2008


Author: ulion
Date: Wed Mar  5 03:46:50 2008
New Revision: 26164

Log:
Fix ffvorbis decoder's output channel order with channel reordering function.


Modified:
   trunk/libaf/reorder_ch.c
   trunk/libaf/reorder_ch.h
   trunk/libmpcodecs/ad_ffmpeg.c

Modified: trunk/libaf/reorder_ch.c
==============================================================================
--- trunk/libaf/reorder_ch.c	(original)
+++ trunk/libaf/reorder_ch.c	Wed Mar  5 03:46:50 2008
@@ -1108,6 +1108,7 @@ static int channel_layout_mapping_5ch[AF
     AF_CHANNEL_LAYOUT_LAVC_AC3_5CH_DEFAULT,
     AF_CHANNEL_LAYOUT_LAVC_LIBA52_5CH_DEFAULT,
     AF_CHANNEL_LAYOUT_LAVC_DCA_5CH_DEFAULT,
+    AF_CHANNEL_LAYOUT_LAVC_VORBIS_5CH_DEFAULT,
 };
 
 static int channel_layout_mapping_6ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = {
@@ -1117,6 +1118,7 @@ static int channel_layout_mapping_6ch[AF
     AF_CHANNEL_LAYOUT_LAVC_AC3_6CH_DEFAULT,
     AF_CHANNEL_LAYOUT_LAVC_LIBA52_6CH_DEFAULT,
     AF_CHANNEL_LAYOUT_LAVC_DCA_6CH_DEFAULT,
+    AF_CHANNEL_LAYOUT_LAVC_VORBIS_6CH_DEFAULT,
 };
 
 void reorder_channel_copy_nch(void *src,

Modified: trunk/libaf/reorder_ch.h
==============================================================================
--- trunk/libaf/reorder_ch.h	(original)
+++ trunk/libaf/reorder_ch.h	Wed Mar  5 03:46:50 2008
@@ -71,6 +71,8 @@
 #define AF_CHANNEL_LAYOUT_LAVC_LIBA52_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_E
 #define AF_CHANNEL_LAYOUT_LAVC_DCA_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_D
 #define AF_CHANNEL_LAYOUT_LAVC_DCA_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_D
+#define AF_CHANNEL_LAYOUT_LAVC_VORBIS_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_C
+#define AF_CHANNEL_LAYOUT_LAVC_VORBIS_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_C
 
 #define AF_CHANNEL_MASK  0xFF
 #define AF_GET_CH_NUM(A) ((A)&0x7F)
@@ -102,7 +104,8 @@ void reorder_channel(void *buf,
 #define AF_CHANNEL_LAYOUT_LAVC_AC3_DEFAULT    3
 #define AF_CHANNEL_LAYOUT_LAVC_LIBA52_DEFAULT 4
 #define AF_CHANNEL_LAYOUT_LAVC_DCA_DEFAULT    5
-#define AF_CHANNEL_LAYOUT_SOURCE_NUM          6
+#define AF_CHANNEL_LAYOUT_LAVC_VORBIS_DEFAULT 6
+#define AF_CHANNEL_LAYOUT_SOURCE_NUM          7
 #define AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT AF_CHANNEL_LAYOUT_ALSA_DEFAULT
 
 /// Optimized channel reorder between different audio sources and targets.

Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c	(original)
+++ trunk/libmpcodecs/ad_ffmpeg.c	Wed Mar  5 03:46:50 2008
@@ -175,6 +175,8 @@ static int decode_audio(sh_audio_t *sh_a
               src_ch_layout = AF_CHANNEL_LAYOUT_AAC_DEFAULT;
             else if (!strcasecmp(codec, "liba52"))
               src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_LIBA52_DEFAULT;
+            else if (!strcasecmp(codec, "vorbis"))
+              src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_VORBIS_DEFAULT;
             else
               src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT;
             reorder_channel_nch(buf, src_ch_layout,



More information about the MPlayer-cvslog mailing list