# HG changeset patch # User alexc # Date 1257971063 0 # Node ID 6f5a1064e48adbbf5b3c844b6cc2fb2fc5a3d666 # Parent ce002ddccf1bb539c3773b7698af00f3a577909f Add a channels field to MPEG4AudioConfig. diff -r ce002ddccf1b -r 6f5a1064e48a flvdec.c --- a/flvdec.c Mon Nov 09 01:10:55 2009 +0000 +++ b/flvdec.c Wed Nov 11 20:24:23 2009 +0000 @@ -410,9 +410,7 @@ MPEG4AudioConfig cfg; ff_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size); - if (cfg.chan_config > 7) - return -1; - st->codec->channels = ff_mpeg4audio_channels[cfg.chan_config]; + st->codec->channels = cfg.channels; st->codec->sample_rate = cfg.sample_rate; dprintf(s, "mp4a config channels %d sample rate %d\n", st->codec->channels, st->codec->sample_rate); diff -r ce002ddccf1b -r 6f5a1064e48a mov.c --- a/mov.c Mon Nov 09 01:10:55 2009 +0000 +++ b/mov.c Wed Nov 11 20:24:23 2009 +0000 @@ -434,9 +434,7 @@ MPEG4AudioConfig cfg; ff_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size); - if (cfg.chan_config > 7) - return -1; - st->codec->channels = ff_mpeg4audio_channels[cfg.chan_config]; + st->codec->channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; else