ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.75k stars 5.28k forks source link

Fix the test fail when enable ffmpeg-opus. v6.0.100 #3868

Closed xiaozhihong closed 7 months ago

xiaozhihong commented 7 months ago
  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.