| @@ -25,6 +25,7 @@ · 24 unmodified lines |
| 25 | #include "xiph.h" | 25 | #include "xiph.h" |
| 26 | #include "matroska.h" | 26 | #include "matroska.h" |
| 27 | #include "avc.h" | 27 | #include "avc.h" |
| | 28 | #include "libavcodec/mpeg4audio.h" |
| 28 | | 29 | |
| 29 | typedef struct ebml_master { | 30 | typedef struct ebml_master { |
| 30 | offset_t pos; ///< absolute offset in the file where the master's elements start | 31 | offset_t pos; ///< absolute offset in the file where the master's elements start |
| @@ -438,10 +439,6 @@ static int put_flac_codecpriv(AVFormatContext *s, ByteIOContext *pb, AVCodecCont · 407 unmodified lines |
| 438 | | 439 | |
| 439 | static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int *sample_rate, int *output_sample_rate) | 440 | static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int *sample_rate, int *output_sample_rate) |
| 440 | { | 441 | { |
| 441 | static const int aac_sample_rates[] = { | | |
| 442 | 96000, 88200, 64000, 48000, 44100, 32000, | | |
| 443 | 24000, 22050, 16000, 12000, 11025, 8000, | | |
| 444 | }; | | |
| 445 | int sri; | 442 | int sri; |
| 446 | | 443 | |
| 447 | if (codec->extradata_size < 2) { | 444 | if (codec->extradata_size < 2) { |
| @@ -454,7 +451,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int · 6 unmodified lines |
| 454 | av_log(s, AV_LOG_WARNING, "AAC samplerate index out of bounds\n"); | 451 | av_log(s, AV_LOG_WARNING, "AAC samplerate index out of bounds\n"); |
| 455 | return; | 452 | return; |
| 456 | } | 453 | } |
| 457 | *sample_rate = aac_sample_rates[sri]; | 454 | *sample_rate = ff_mpeg4audio_sample_rates[sri]; |
| 458 | | 455 | |
| 459 | // if sbr, get output sample rate as well | 456 | // if sbr, get output sample rate as well |
| 460 | if (codec->extradata_size == 5) { | 457 | if (codec->extradata_size == 5) { |
| @@ -463,7 +460,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int · 2 unmodified lines |
| 463 | av_log(s, AV_LOG_WARNING, "AAC output samplerate index out of bounds\n"); | 460 | av_log(s, AV_LOG_WARNING, "AAC output samplerate index out of bounds\n"); |
| 464 | return; | 461 | return; |
| 465 | } | 462 | } |
| 466 | *output_sample_rate = aac_sample_rates[sri]; | 463 | *output_sample_rate = ff_mpeg4audio_sample_rates[sri]; |
| 467 | } | 464 | } |
| 468 | } | 465 | } |
| 469 | | 466 | |