diff options
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 4 | ||||
-rw-r--r-- | libavformat/mov.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index b3b3cc1930..27062dcb97 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -410,9 +410,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) 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 --git a/libavformat/mov.c b/libavformat/mov.c index 3d676308f9..196f41d1b4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -434,9 +434,7 @@ int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom) 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 |