Mercurial > libavformat.hg
diff matroskadec.c @ 3201:1a16b069daca libavformat
use common aac sample rate tables
author | aurel |
---|---|
date | Wed, 02 Apr 2008 21:41:48 +0000 |
parents | df53e261fe4d |
children | 2e2221a3febb |
line wrap: on
line diff
--- a/matroskadec.c Wed Apr 02 19:03:59 2008 +0000 +++ b/matroskadec.c Wed Apr 02 21:41:48 2008 +0000 @@ -33,6 +33,7 @@ #include "riff.h" #include "intfloat_readwrite.h" #include "matroska.h" +#include "libavcodec/mpeg4audio.h" typedef struct Track { MatroskaTrackType type; @@ -1997,14 +1998,10 @@ static int matroska_aac_sri (int samplerate) { - static const int aac_sample_rates[] = { - 96000, 88200, 64000, 48000, 44100, 32000, - 24000, 22050, 16000, 12000, 11025, 8000, - }; int sri; - for (sri=0; sri<ARRAY_SIZE(aac_sample_rates); sri++) - if (aac_sample_rates[sri] == samplerate) + for (sri=0; sri<ARRAY_SIZE(ff_mpeg4audio_sample_rates); sri++) + if (ff_mpeg4audio_sample_rates[sri] == samplerate) break; return sri; }