[Live-devel] StreamReplicator bug deactivating a replica?

Bruno Abreu bruno.abreu at livingdata.pt
Thu May 3 02:33:57 PDT 2012


Hello Ross,
sorry for the late reply.

I'm afraid replacing the 2 "for" loops with the code you provided 
generates a segmentation fault in our app.

Of course, it may be something in our application so I'll run more tests 
today and will provide you with more information as soon as I can.

Thank you for your attention.

Bruno Abreu

On 05/01/2012 02:32 AM, Ross Finlayson wrote:
> 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/
>
> !DSPAM:500,4f9f3e21140493728916153!
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
> !DSPAM:500,4f9f3e21140493728916153!


-- 
Living Data - Sistemas de Informação e Apoio à Decisão, Lda.

Rua Luís de Camões, Nº 133, 1º B      Phone:  +351 213622163
1300-357 LISBOA                       Fax:    +351 213622165
Portugal                              URL: www.livingdata.pt


More information about the live-devel mailing list