Skip to content

Commit

Permalink
Fix reserve in iterateRemoteTracks()
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed Aug 10, 2024
1 parent 88ea6ad commit 8c3e1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ void PeerConnection::iterateRemoteTracks(std::function<void(shared_ptr<Track> tr
std::vector<shared_ptr<Track>> locked;
{
std::shared_lock lock(mTracksMutex); // read-only
locked.reserve(mTracks.size());
locked.reserve(remote->mediaCount());
for(int i = 0; i < remote->mediaCount(); ++i) {
if (std::holds_alternative<Description::Media *>(remote->media(i))) {
auto remoteMedia = std::get<Description::Media *>(remote->media(i));
Expand Down

0 comments on commit 8c3e1b2

Please sign in to comment.