mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Remove redundant check.
This commit is contained in:
parent
957ee4cc25
commit
cbecd3816e
1 changed files with 6 additions and 6 deletions
|
@ -908,18 +908,18 @@ srs_error_t SrsRtcRtpBuilder::on_audio(SrsSharedPtrMessage* msg)
|
|||
return srs_error_wrap(err, "format consume audio");
|
||||
}
|
||||
|
||||
// Try to init codec when startup or codec changed.
|
||||
if (format->acodec && (err = init_codec(format->acodec->id)) != srs_success) {
|
||||
return srs_error_wrap(err, "init codec");
|
||||
}
|
||||
|
||||
// Ignore if no format->acodec, it means the codec is not parsed, or unknown codec.
|
||||
// @issue https://github.com/ossrs/srs/issues/1506#issuecomment-562079474
|
||||
if (!format->acodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// ts support audio codec: aac/mp3
|
||||
// Try to init codec when startup or codec changed.
|
||||
if ((err = init_codec(format->acodec->id)) != srs_success) {
|
||||
return srs_error_wrap(err, "init codec");
|
||||
}
|
||||
|
||||
// support audio codec: aac/mp3
|
||||
SrsAudioCodecId acodec = format->acodec->id;
|
||||
if (acodec != SrsAudioCodecIdAAC && acodec != SrsAudioCodecIdMP3) {
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue