1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refactor the RTC sender audio queue

This commit is contained in:
winlin 2020-05-03 14:28:51 +08:00
parent a23f102874
commit a812183144
4 changed files with 16 additions and 36 deletions

View file

@ -1936,20 +1936,16 @@ srs_error_t SrsRtcPublisher::collect_audio_frames()
{
srs_error_t err = srs_success;
std::vector<std::vector<SrsRtpPacket2*> > frames;
std::vector<SrsRtpPacket2*> frames;
audio_queue_->collect_frames(audio_nack_, frames);
for (size_t i = 0; i < frames.size(); ++i) {
vector<SrsRtpPacket2*>& packets = frames[i];
SrsRtpPacket2* pkt = frames[i];
for (size_t j = 0; j < packets.size(); ++j) {
SrsRtpPacket2* pkt = packets[j];
// TODO: FIXME: Check error.
do_collect_audio_frame(pkt);
// TODO: FIXME: Check error.
do_collect_audio_frame(pkt);
srs_freep(pkt);
}
srs_freep(pkt);
}
return err;