Ignore:
Timestamp:
Feb 13, 2009 3:33:03 PM (16 years ago)
Author:
nanang
Message:

Ticket #728:

  • Fixed l16_open() to initialize VAD & PLC settings.
  • Minor fixes: updated few parts related to macro PLC_DISABLED.
File:
1 edited

Legend:

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

    r2394 r2453  
    9999    &l16_encode, 
    100100    &l16_decode, 
     101#if !PLC_DISABLED 
    101102    &l16_recover 
     103#else 
     104    NULL 
     105#endif 
    102106}; 
    103107 
     
    129133    unsigned             clock_rate;    /* Clock rate */ 
    130134 
     135#if !PLC_DISABLED 
    131136    pj_bool_t            plc_enabled; 
    132 #if !PLC_DISABLED 
    133137    pjmedia_plc         *plc; 
    134138#endif 
     
    527531                            pjmedia_codec_param *attr ) 
    528532{ 
    529     /* Nothing to do.. */ 
    530     PJ_UNUSED_ARG(codec); 
    531     PJ_UNUSED_ARG(attr); 
     533    struct l16_data *data = NULL; 
     534     
     535    PJ_ASSERT_RETURN(codec && codec->codec_data && attr, PJ_EINVAL); 
     536 
     537    data = (struct l16_data*) codec->codec_data; 
     538 
     539    data->vad_enabled = (attr->setting.vad != 0); 
     540#if !PLC_DISABLED 
     541    data->plc_enabled = (attr->setting.plc != 0); 
     542#endif 
     543 
    532544    return PJ_SUCCESS; 
    533545} 
     
    548560 
    549561    data->vad_enabled = (attr->setting.vad != 0); 
     562#if !PLC_DISABLED 
    550563    data->plc_enabled = (attr->setting.plc != 0); 
     564#endif 
    551565 
    552566    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.