[vlc-devel] commit: Try to fix compilation with older ffmpeg version. (Laurent Aimar )

git version control git at videolan.org
Wed May 6 21:53:31 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed May  6 21:44:51 2009 +0200| [e5e22fe50870e8e83728ed6f96c8a80b1f7c47dd] | committer: Laurent Aimar 

Try to fix compilation with older ffmpeg version.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5e22fe50870e8e83728ed6f96c8a80b1f7c47dd
---

 modules/codec/avcodec/audio.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 79c0aa0..da0bd4b 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -390,6 +390,7 @@ void EndAudioDec( decoder_t *p_dec )
 /*****************************************************************************
  *
  *****************************************************************************/
+#if defined(LIBAVCODEC_AUDIO_LAYOUT)
 static const uint64_t pi_channels_map[][2] =
 {
     { CH_FRONT_LEFT,        AOUT_CHAN_LEFT },
@@ -413,6 +414,31 @@ static const uint64_t pi_channels_map[][2] =
     { CH_STEREO_LEFT,       0 },
     { CH_STEREO_RIGHT,      0 },
 };
+#else
+static const uint64_t pi_channels_map[][2] =
+{
+    { 0, AOUT_CHAN_LEFT },
+    { 0, AOUT_CHAN_RIGHT },
+    { 0, AOUT_CHAN_CENTER },
+    { 0, AOUT_CHAN_LFE },
+    { 0, AOUT_CHAN_REARLEFT },
+    { 0, AOUT_CHAN_REARRIGHT },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, AOUT_CHAN_REARCENTER },
+    { 0, AOUT_CHAN_MIDDLELEFT },
+    { 0, AOUT_CHAN_MIDDLERIGHT },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 0 },
+};
+#endif
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 2, 0 )
 #   define LIBAVCODEC_AUDIO_LAYOUT




More information about the vlc-devel mailing list