mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1636, fix bug for mux AAC to ADTS, never overwrite by RTMP sampling rate. 4.0.13
This commit is contained in:
parent
c66f33ac87
commit
aa20a04abb
6 changed files with 12 additions and 12 deletions
|
@ -438,7 +438,6 @@ srs_error_t SrsRawAacStream::adts_demux(SrsBuffer* stream, char** pframe, int* p
|
|||
srs_error_t SrsRawAacStream::mux_sequence_header(SrsRawAacStreamCodec* codec, string& sh)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
char samplingFrequencyIndex = codec->sampling_frequency_index;
|
||||
|
||||
// only support aac profile 1-4.
|
||||
if (codec->aac_object == SrsAacObjectTypeReserved) {
|
||||
|
@ -447,9 +446,10 @@ srs_error_t SrsRawAacStream::mux_sequence_header(SrsRawAacStreamCodec* codec, st
|
|||
|
||||
SrsAacObjectType audioObjectType = codec->aac_object;
|
||||
char channelConfiguration = codec->channel_configuration;
|
||||
|
||||
if (samplingFrequencyIndex >= 16) {
|
||||
samplingFrequencyIndex = 4;//default 44100
|
||||
|
||||
char samplingFrequencyIndex = codec->sampling_frequency_index;
|
||||
if (samplingFrequencyIndex >= SrsAAcSampleRateNumbers) {
|
||||
samplingFrequencyIndex = 4; // Default to 44100
|
||||
}
|
||||
|
||||
char chs[2];
|
||||
|
|
|
@ -30,11 +30,6 @@
|
|||
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
||||
static const int mpeg4audio_sample_rates[16] = {
|
||||
96000, 88200, 64000, 48000, 44100, 32000,
|
||||
24000, 22050, 16000, 12000, 11025, 8000, 7350
|
||||
};
|
||||
|
||||
class SrsBuffer;
|
||||
|
||||
// The raw h.264 stream, in annexb.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue