Changeset 2748


Ignore:
Timestamp:
Jun 4, 2009 7:36:52 PM (10 years ago)
Author:
nanang
Message:

Ticket #879:

  • Fixed bug in conf bridge create_on_port() (bug of r2747).
  • Updated sound port to instantiate sync port only when audio format is PCM.
Location:
pjproject/trunk/pjmedia/src/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/conference.c

    r2747 r2748  
    459459 
    460460 
    461     status = create_conf_port(conf, pool, &name, NULL, &conf_port); 
     461    status = create_conf_port(pool, conf, NULL, &name, &conf_port); 
    462462    if (status != PJ_SUCCESS) 
    463463        return status; 
  • pjproject/trunk/pjmedia/src/pjmedia/sound_port.c

    r2747 r2748  
    565565    pjmedia_port_info *pinfo; 
    566566    pjmedia_aud_param *param; 
    567     pjmedia_sync_param sync_param; 
    568567    pj_status_t status; 
    569568 
     
    610609    } 
    611610 
    612     /* Create sync port */ 
    613     pj_bzero(&sync_param, sizeof(sync_param)); 
    614     sync_param.options = PJMEDIA_SYNC_DONT_DESTROY_DN; 
    615     status = pjmedia_sync_port_create(snd_port->pool,  
    616                                       (snd_port->echo_port? 
    617                                        snd_port->echo_port:snd_port->port), 
    618                                       &sync_param, &snd_port->sync_port); 
    619     if (status != PJ_SUCCESS) 
    620         return status; 
    621  
    622     /* Update down port of sound port */ 
    623     snd_port->dn_port = snd_port->sync_port; 
     611    /* Create sync port. Only do this if the format is PCM! */ 
     612    if (param->ext_fmt.id == PJMEDIA_FORMAT_PCM) { 
     613        pjmedia_sync_param sync_param; 
     614         
     615        pj_bzero(&sync_param, sizeof(sync_param)); 
     616        sync_param.options = PJMEDIA_SYNC_DONT_DESTROY_DN; 
     617        status = pjmedia_sync_port_create(snd_port->pool,  
     618                                          (snd_port->echo_port? 
     619                                           snd_port->echo_port:snd_port->port), 
     620                                          &sync_param, &snd_port->sync_port); 
     621        if (status != PJ_SUCCESS) 
     622            return status; 
     623 
     624        /* Update down port of sound port */ 
     625        snd_port->dn_port = snd_port->sync_port; 
     626    } 
    624627 
    625628    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.