[Live-devel] StreamReplicator bug deactivating a replica?
Ross Finlayson
finlayson at live555.com
Mon Apr 30 18:32:28 PDT 2012
Thanks for the report. Yes, there is a bug in that code, although it wasn't quite what you thought. Try replacing those two "for" loops with the following:
for (StreamReplica* r1 = fReplicasAwaitingCurrentFrame; r1 != NULL;) {
if (r1 == replicaBeingDeactivated) {
if (r1 == fReplicasAwaitingCurrentFrame) fReplicasAwaitingCurrentFrame = r1->fNext;
r1 = r1->fNext;
replicaBeingDeactivated->fNext = NULL;
break;
} else {
r1 = r1->fNext;
}
}
for (StreamReplica* r2 = fReplicasAwaitingNextFrame; r2 != NULL;) {
if (r2 == replicaBeingDeactivated) {
if (r2 == fReplicasAwaitingNextFrame) fReplicasAwaitingNextFrame = r2->fNext;
r2 = r2->fNext;
replicaBeingDeactivated->fNext = NULL;
break;
} else {
r2 = r2->fNext;
}
}
}
If you find any problem with this, then please let us know ASAP. Otherwise I'll release a new version of the code with this change.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120430/5be51e11/attachment-0001.html>
More information about the live-devel
mailing list