diff options
author | Alex Converse <alex.converse@gmail.com> | 2009-11-11 20:24:23 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2009-11-11 20:24:23 +0000 |
commit | 5aea268d14b2973188589c89b275d8b248150446 (patch) | |
tree | ab2fca9255ac2087ffd0dbc809cd9bdb9b67231a /libavcodec | |
parent | f2b7ce8ae68f9d262ce102605532d3520e279a67 (diff) | |
download | ffmpeg-5aea268d14b2973188589c89b275d8b248150446.tar.gz |
Add a channels field to MPEG4AudioConfig.
Originally committed as revision 20512 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 4 | ||||
-rw-r--r-- | libavcodec/mpeg4audio.c | 2 | ||||
-rw-r--r-- | libavcodec/mpeg4audio.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5d470b0d54..6e56257aa6 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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, \ diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 6c0bc7d76a..8c9657273c 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -57,6 +57,8 @@ int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_si 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; diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index 5e3a1d39fb..c9eac18188 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -36,6 +36,7 @@ typedef struct { int ext_sampling_index; int ext_sample_rate; int ext_chan_config; + int channels; } MPEG4AudioConfig; extern const int ff_mpeg4audio_sample_rates[16]; |