1
0
Fork 0
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:
winlin 2020-03-13 16:56:00 +08:00
parent c66f33ac87
commit aa20a04abb
6 changed files with 12 additions and 12 deletions

View file

@ -520,9 +520,10 @@ srs_error_t rtmp_client::on_ts_video(std::shared_ptr<SrsBuffer> avs_ptr, uint64_
int rtmp_client::get_sample_rate(char sample_index) {
int sample_rate = 44100;
if ((sample_index >= 0) && (sample_index < 16)) {
sample_rate = mpeg4audio_sample_rates[sample_index];
if ((sample_index >= 0) && (sample_index < SrsAAcSampleRateNumbers)) {
sample_rate = srs_aac_srates[(uint8_t)sample_index];
}
return sample_rate;
}