[Live-devel] ServerMediaSession::numSubsessions() and fNumStreamStates in RTSPServer::RTSPClientSession::handleCmd_SETUP()
Ross Finlayson
finlayson at live555.com
Thu Jun 30 14:04:03 PDT 2016
> The question is more general, it is about a using the linear iteration
> to count objects instead of a using the counter which is present in the
> linked list container
Yes, good point. It turns out that the “fSubsessionCounter” variable (used in “numSubsessions()”) wasn’t added until fairly recently (2012). That’s why we didn’t use it in the (much earlier) code for setting “fNumStreamStates”. But you’re right - it could (should) be used, as a small optimization. This change will be made in the next release of the code.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list