changeset 10518:d7ac0d3ddd95 libavcodec

Add a channels field to MPEG4AudioConfig.
author alexc
date Wed, 11 Nov 2009 20:24:23 +0000
parents 5317dff91b48
children 06d6393bbaeb
files avcodec.h mpeg4audio.c mpeg4audio.h
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Wed Nov 11 11:00:50 2009 +0000
+++ b/avcodec.h	Wed Nov 11 20:24:23 2009 +0000
@@ -30,8 +30,8 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 38
-#define LIBAVCODEC_VERSION_MICRO  1
+#define LIBAVCODEC_VERSION_MINOR 39
+#define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
--- a/mpeg4audio.c	Wed Nov 11 11:00:50 2009 +0000
+++ b/mpeg4audio.c	Wed Nov 11 20:24:23 2009 +0000
@@ -57,6 +57,8 @@
     c->object_type = get_object_type(&gb);
     c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
     c->chan_config = get_bits(&gb, 4);
+    if (c->chan_config < FF_ARRAY_ELEMS(ff_mpeg4audio_channels))
+        c->channels = ff_mpeg4audio_channels[c->chan_config];
     c->sbr = -1;
     if (c->object_type == AOT_SBR) {
         c->ext_object_type = c->object_type;
--- a/mpeg4audio.h	Wed Nov 11 11:00:50 2009 +0000
+++ b/mpeg4audio.h	Wed Nov 11 20:24:23 2009 +0000
@@ -36,6 +36,7 @@
     int ext_sampling_index;
     int ext_sample_rate;
     int ext_chan_config;
+    int channels;
 } MPEG4AudioConfig;
 
 extern const int ff_mpeg4audio_sample_rates[16];