diff --git a/coreapi/upnp.c b/coreapi/upnp.c index a05e1e0f2..5ef70ba25 100644 --- a/coreapi/upnp.c +++ b/coreapi/upnp.c @@ -563,7 +563,7 @@ int linphone_core_update_upnp_from_remote_media_description(LinphoneCall *call, int i; const SalStreamDescription *stream; - for (i = 0; i < md->nstreams; i++) { + for (i = 0; i < md->n_total_streams; i++) { stream = &md->streams[i]; if(stream->type == SalAudio) { audio = TRUE; @@ -795,7 +795,7 @@ int linphone_core_update_local_media_description_from_upnp(SalMediaDescription * SalStreamDescription *stream; UpnpStream *upnpStream; - for (i = 0; i < desc->nstreams; i++) { + for (i = 0; i < desc->n_active_streams; i++) { stream = &desc->streams[i]; upnpStream = NULL; if(stream->type == SalAudio) {