Changeset 807


Ignore:
Timestamp:
Nov 19, 2006 8:28:34 PM (14 years ago)
Author:
bennylp
Message:

Fixed memory leaks bug in speex codec

Location:
pjproject/trunk/pjmedia/src/pjmedia-codec
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex/sb_celp.c

    r628 r807  
    362362   speex_free(st->interp_qlpc); 
    363363   speex_free(st->pi_gain); 
     364   speex_free(st->low_innov); 
    364365 
    365366   speex_free(st->mem_sp); 
     
    925926   speex_free(st->pi_gain); 
    926927   speex_free(st->mem_sp); 
     928   speex_free(st->low_innov); 
    927929 
    928930   speex_free(state); 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex_codec.c

    r637 r807  
    311311    } 
    312312 
     313    pj_mutex_lock(spx_factory.mutex); 
     314 
    313315    /* We don't want to deinit if there's outstanding codec. */ 
    314     pj_mutex_lock(spx_factory.mutex); 
     316    /* This is silly, as we'll always have codec in the list if 
     317       we ever allocate a codec! A better behavior maybe is to  
     318       deallocate all codecs in the list. 
    315319    if (!pj_list_empty(&spx_factory.codec_list)) { 
    316320        pj_mutex_unlock(spx_factory.mutex); 
    317321        return PJ_EBUSY; 
    318322    } 
     323    */ 
    319324 
    320325    /* Get the codec manager. */ 
     
    743748    } 
    744749 
    745     /* Initialization of the structure that holds the bits */ 
    746     speex_bits_init(&spx->dec_bits); 
    747  
    748750    /* Copy the data into the bit-stream struct */ 
    749751    speex_bits_read_from(&spx->dec_bits, input->buf, input->size); 
Note: See TracChangeset for help on using the changeset viewer.