[FFmpeg-cvslog] r26324 - in trunk/libavcore: audioconvert.c audioconvert.h avcore.h

stefano subversion
Thu Jan 13 02:00:32 CET 2011


Author: stefano
Date: Thu Jan 13 02:00:31 2011
New Revision: 26324

Log:
Make av_get_channel_layout_string() guess the number of channels if it
was not provided.

Modified:
   trunk/libavcore/audioconvert.c
   trunk/libavcore/audioconvert.h
   trunk/libavcore/avcore.h

Modified: trunk/libavcore/audioconvert.c
==============================================================================
--- trunk/libavcore/audioconvert.c	Wed Jan 12 22:23:16 2011	(r26323)
+++ trunk/libavcore/audioconvert.c	Thu Jan 13 02:00:31 2011	(r26324)
@@ -78,6 +78,9 @@ void av_get_channel_layout_string(char *
 {
     int i;
 
+    if (nb_channels <= 0)
+        nb_channels = av_get_channel_layout_nb_channels(channel_layout);
+
     for (i = 0; channel_layout_map[i].name; i++)
         if (nb_channels    == channel_layout_map[i].nb_channels &&
             channel_layout == channel_layout_map[i].layout) {

Modified: trunk/libavcore/audioconvert.h
==============================================================================
--- trunk/libavcore/audioconvert.h	Wed Jan 12 22:23:16 2011	(r26323)
+++ trunk/libavcore/audioconvert.h	Thu Jan 13 02:00:31 2011	(r26324)
@@ -80,6 +80,7 @@ int64_t av_get_channel_layout(const char
 
 /**
  * Return a description of a channel layout.
+ * If nb_channels is <= 0, it is guessed from the channel_layout.
  *
  * @param buf put here the string containing the channel layout
  * @param buf_size size in bytes of the buffer

Modified: trunk/libavcore/avcore.h
==============================================================================
--- trunk/libavcore/avcore.h	Wed Jan 12 22:23:16 2011	(r26323)
+++ trunk/libavcore/avcore.h	Thu Jan 13 02:00:31 2011	(r26324)
@@ -28,7 +28,7 @@
 
 #define LIBAVCORE_VERSION_MAJOR  0
 #define LIBAVCORE_VERSION_MINOR 16
-#define LIBAVCORE_VERSION_MICRO  0
+#define LIBAVCORE_VERSION_MICRO  1
 
 #define LIBAVCORE_VERSION_INT   AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \
                                                LIBAVCORE_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list