Changeset 3198 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Jun 4, 2010 1:41:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r3172 r3198 1302 1302 const pjmedia_sdp_media *rem_m = rem_sdp->media[i]; 1303 1303 pjmedia_sdp_media *m; 1304 const pjmedia_sdp_attr *a;1305 1304 1306 1305 if ((int)i == call->audio_idx) 1307 1306 continue; 1308 1307 1309 m = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_media); 1310 pj_strdup(pool, &m->desc.media, &rem_m->desc.media); 1311 pj_strdup(pool, &m->desc.transport, &rem_m->desc.transport); 1312 m->desc.port = 0; 1313 1314 /* Add one format, copy from the offer. And copy the corresponding 1315 * rtpmap and fmtp attributes too. 1316 */ 1317 m->desc.fmt_count = 1; 1318 pj_strdup(pool, &m->desc.fmt[0], &rem_m->desc.fmt[0]); 1319 if ((a=pjmedia_sdp_attr_find2(rem_m->attr_count, rem_m->attr, 1320 "rtpmap", &m->desc.fmt[0])) != NULL) 1321 { 1322 m->attr[m->attr_count++] = pjmedia_sdp_attr_clone(pool, a); 1323 } 1324 if ((a=pjmedia_sdp_attr_find2(rem_m->attr_count, rem_m->attr, 1325 "fmtp", &m->desc.fmt[0])) != NULL) 1326 { 1327 m->attr[m->attr_count++] = pjmedia_sdp_attr_clone(pool, a); 1328 } 1329 1308 m = pjmedia_sdp_media_clone_deactivate(pool, rem_m); 1330 1309 if (i==sdp->media_count) 1331 1310 sdp->media[sdp->media_count++] = m;
Note: See TracChangeset
for help on using the changeset viewer.