Changeset 1809


Ignore:
Timestamp:
Feb 21, 2008 9:00:36 AM (17 years ago)
Author:
bennylp
Message:

Ticket #487: Crash occured when stream port has no transmitter on call using ILBC with different ptime

File:
1 edited

Legend:

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

    r1798 r1809  
    481481    /* Append new frame to the buffer */ 
    482482    if (frame->size) { 
    483         pj_memcpy(stream->enc_buf + stream->enc_buf_count, 
    484                   frame->buf, frame->size); 
     483        /* Handle case when there is no port transmitting to this port */ 
     484        if (frame->buf) { 
     485            pj_memcpy(stream->enc_buf + stream->enc_buf_count, 
     486                      frame->buf, frame->size); 
     487        } else { 
     488            pj_bzero(stream->enc_buf + stream->enc_buf_count, frame->size); 
     489        } 
    485490        stream->enc_buf_count += (frame->size >> 1); 
    486491    } 
Note: See TracChangeset for help on using the changeset viewer.