Ignore:
Timestamp:
Mar 30, 2012 7:10:13 AM (12 years ago)
Author:
bennylp
Message:

Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch)

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjmedia/src/pjmedia/conf_switch.c

    r3915 r3999  
    10871087            unsigned nsamples_to_copy, nsamples_req; 
    10881088 
    1089             /* Copy frame to listener's TX buffer. */ 
     1089            /* Copy frame to listener's TX buffer. 
     1090             * Note that if the destination is port 0, just copy the whole 
     1091             * available samples. 
     1092             */ 
    10901093            nsamples_to_copy = f_end - f_start; 
    10911094            nsamples_req = cport_dst->samples_per_frame - 
    10921095                          (frm_dst->size>>1); 
    1093             if (nsamples_to_copy > nsamples_req) 
     1096            if (cport_dst->slot && nsamples_to_copy > nsamples_req) 
    10941097                nsamples_to_copy = nsamples_req; 
    10951098 
     
    11241127            /* Check if it's time to deliver the TX buffer to listener,  
    11251128             * i.e: samples count in TX buffer equal to listener's 
    1126              * samples per frame. 
     1129             * samples per frame. Note that for destination port 0 this 
     1130             * function will just populate all samples in the TX buffer. 
    11271131             */ 
    1128             if ((frm_dst->size >> 1) == cport_dst->samples_per_frame) 
     1132            if (cport_dst->slot == 0) { 
     1133                /* Update TX timestamp. */ 
     1134                pj_add_timestamp32(&cport_dst->ts_tx, nsamples_to_copy); 
     1135            } else if ((frm_dst->size >> 1) ==  
     1136                       cport_dst->samples_per_frame) 
    11291137            { 
    1130                 if (cport_dst->slot) { 
    1131                     pjmedia_port_put_frame(cport_dst->port, frm_dst); 
    1132  
    1133                     /* Reset TX buffer. */ 
    1134                     frm_dst->size = 0; 
    1135                 } 
     1138                pjmedia_port_put_frame(cport_dst->port, frm_dst); 
     1139 
     1140                /* Reset TX buffer. */ 
     1141                frm_dst->size = 0; 
    11361142 
    11371143                /* Update TX timestamp. */ 
Note: See TracChangeset for help on using the changeset viewer.