diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-12-20 09:52:19 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-12-20 09:52:19 +0000 |
commit | f7f47c2b3b622e5d00faf456b4b7ab10c63a2f49 (patch) | |
tree | 323c39843e9758c467224628d340ca17adc44048 /pjmedia/src | |
parent | c297f3477e21e31976f417c3b3d50529f6b84b4c (diff) |
Fix #1425:
- Updating port info of the switchboard master port (after reopening audio device) with the audio device param should care about PJMEDIA_AUD_DEV_CAP_EXT_FORMAT flag, i.e: only copy from audio device extended format info when the flag is set.
- Fixed switchboard to update the master port info shortcut in connecting ports, as master port info may get updated to match to the connecting ports.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3915 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src')
-rw-r--r-- | pjmedia/src/pjmedia/conf_switch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/conf_switch.c b/pjmedia/src/pjmedia/conf_switch.c index f5d6b78c..1e13e738 100644 --- a/pjmedia/src/pjmedia/conf_switch.c +++ b/pjmedia/src/pjmedia/conf_switch.c @@ -590,6 +590,12 @@ PJ_DEF(pj_status_t) pjmedia_conf_connect_port( pjmedia_conf *conf, break; } + /* Update master port info shortcut, note that application may update + * the master port info when the audio device needs to be reopened with + * a new format to match to ports connection format. + */ + conf->ports[0]->samples_per_frame = PJMEDIA_PIA_SPF(conf->ports[0]->info); + if (i == src_port->listener_cnt) { src_port->listener_slots[src_port->listener_cnt] = sink_slot; ++conf->connect_cnt; |