mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix the test fail when enable ffmpeg-opus. v6.0.100 (#3868)
1. After enabling FFmpeg opus, the transcoding time for each opus packet is around 4ms. 2. To speed up case execution, our test publisher sends 400 opus packets at intervals of 1ms. 3. After the publisher starts, wait for 30ms, then the player starts. 4. Due to the lengthy processing time for each opus packet, SRS continuously receives packets from the publisher, so it doesn't switch coroutines and can't accept the player's connection. 5. Only after all opus packets are processed will it accept the player connection. Therefore, the player doesn't receive any data, leading to the failure of the case. --------- Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
parent
a2324a620a
commit
24235d8b6a
8 changed files with 17 additions and 7 deletions
|
@ -247,6 +247,10 @@ srs_error_t SrsAudioTranscoder::init_enc(SrsAudioCodecId dst_codec, int dst_chan
|
|||
//TODO: for more level setting
|
||||
enc_->compression_level = 1;
|
||||
enc_->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
|
||||
|
||||
#ifdef SRS_FFMPEG_OPUS
|
||||
av_opt_set(enc_->priv_data, "opus_delay", "2.5", 0);
|
||||
#endif
|
||||
} else if (dst_codec == SrsAudioCodecIdAAC) {
|
||||
enc_->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue