Changeset 5947
- Timestamp:
- Mar 8, 2019 7:02:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/vid_conf.c
r5939 r5947 610 610 611 611 if (i != src_port->listener_cnt) { 612 unsigned k; 613 612 614 pj_assert(j != dst_port->transmitter_cnt); 613 615 pj_assert(src_port->listener_cnt > 0 && … … 615 617 pj_assert(dst_port->transmitter_cnt > 0 && 616 618 dst_port->transmitter_cnt < vid_conf->opt.max_slot_cnt); 619 620 /* Cleanup all render states of the sink */ 621 for (k=0; k<dst_port->transmitter_cnt; ++k) 622 cleanup_render_state(dst_port, k); 623 624 /* Update listeners array of the source and transmitters array of 625 * the sink. 626 */ 617 627 pj_array_erase(src_port->listener_slots, sizeof(unsigned), 618 628 src_port->listener_cnt, i); … … 622 632 --dst_port->transmitter_cnt; 623 633 624 cleanup_render_state(src_port, j);634 /* Update render states of the sink */ 625 635 update_render_state(vid_conf, dst_port); 626 636 … … 806 816 if (cp->render_pool[transmitter_idx]) { 807 817 pj_pool_safe_release(&cp->render_pool[transmitter_idx]); 818 819 TRACE_((THIS_FILE, "Cleaned up render state for connection %d->%d", 820 cp->transmitter_slots[transmitter_idx], cp->idx)); 808 821 } 809 822 } … … 822 835 unsigned i; 823 836 pj_status_t status; 824 char buf[5];825 837 826 838 /* Nothing to render, just return */ … … 860 872 render_state *rs; 861 873 pjmedia_conversion_param cparam; 874 char tmp_buf[32]; 862 875 863 876 /* Create pool & render state */ 864 pool = pj_pool_create(cp->pool->factory, "vconf_rdr", 128, 128, NULL); 877 pj_ansi_snprintf(tmp_buf, sizeof(tmp_buf), "vcport_rs_%d->%d", 878 cp->transmitter_slots[i], cp->idx); 879 pool = pj_pool_create(cp->pool->factory, tmp_buf, 128, 128, NULL); 865 880 cp->render_pool[i] = pool; 866 881 rs = cp->render_states[i] = PJ_POOL_ZALLOC_T(pool, render_state); 882 883 TRACE_((THIS_FILE, "Created render state for connection %d->%d", 884 cp->transmitter_slots[i], cp->idx)); 867 885 868 886 /* Setup format & frame */ … … 963 981 rs->src_rect.coord.y = (tr_size[i].h - rs->src_rect.size.h)/2; 964 982 965 TRACE_((THIS_FILE, "src %d=%s/%dx%d->%dx%d@%d,%d dst=%dx%d@%d,%d",966 i, pjmedia_fourcc_name(tr_fmt_id[i], buf),983 TRACE_((THIS_FILE, "src#%d=%s/%dx%d->%dx%d@%d,%d dst=%dx%d@%d,%d", 984 i, pjmedia_fourcc_name(tr_fmt_id[i], tmp_buf), 967 985 tr_size[i].w, tr_size[i].h, 968 986 rs->src_rect.size.w, rs->src_rect.size.h,
Note: See TracChangeset
for help on using the changeset viewer.