]> sjero.net Git - linphone/commitdiff
fix offer answer bug when counting active streams.
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 25 Feb 2013 16:44:51 +0000 (17:44 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 25 Feb 2013 16:44:51 +0000 (17:44 +0100)
coreapi/offeranswer.c

index ab38f76366997f3665fd59dbc4fdb2c90208529e..9823c24a69f12f6b448d4b687d85436249c9fdb7 100644 (file)
@@ -313,10 +313,9 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
                }else ms_warning("Unknown protocol for mline %i, declining",i);
                if (ls){
                        initiate_incoming(ls,rs,&result->streams[i],one_matching_codec);
-                       result->n_active_streams++;
-               }
-               else {
-                       /* create an inactive stream for the answer, as there where no matching stream a local capability */
+                       if (result->streams[i].rtp_port!=0) result->n_active_streams++;
+               }else {
+                       /* create an inactive stream for the answer, as there where no matching stream in local capabilities */
                        result->streams[i].dir=SalStreamInactive;
                        result->streams[i].rtp_port=0;
                        result->streams[i].type=rs->type;