Changeset 3100


Ignore:
Timestamp:
Feb 17, 2010 5:31:19 PM (14 years ago)
Author:
bennylp
Message:

More ticket #1028: fixed compile error caused by corrupted version of passthrough.c when re-commiting r3074 (in r3078). (note: this changeset was originally done by nanang, recheckedin due to moving svn repository)

File:
1 edited

Legend:

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

    r3078 r3100  
    682682        amr_settings_t *s; 
    683683        pj_uint8_t octet_align = 0; 
    684         const pj_str_t STR_FMTP_OCTET_ALIGN = {"octet-align", 11}; 
    685  
    686         /* Fetch octet-align setting. It should be fine to fetch only  
    687          * the decoder, since encoder & decoder must use the same setting  
    688          * (RFC 4867 section 8.3.1). 
    689          */ 
     684        pj_int8_t enc_mode; 
     685         
     686        enc_mode = pjmedia_codec_amr_get_mode(attr->info.avg_bps); 
     687        pj_assert(enc_mode >= 0 && enc_mode <= 8); 
     688 
    690689        for (i = 0; i < attr->setting.dec_fmtp.cnt; ++i) { 
     690            const pj_str_t STR_FMTP_OCTET_ALIGN = {"octet-align", 11}; 
     691             
     692            /* Fetch octet-align setting. It should be fine to fetch only  
     693             * the decoder, since encoder & decoder must use the same setting  
     694             * (RFC 4867 section 8.3.1). 
     695             */ 
    691696            if (pj_stricmp(&attr->setting.dec_fmtp.param[i].name,  
    692697                           &STR_FMTP_OCTET_ALIGN) == 0) 
     
    699704 
    700705        for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) { 
     706            const pj_str_t STR_FMTP_MODE_SET = {"mode-set", 8}; 
     707 
    701708            /* mode-set, encoding mode is chosen based on local default mode  
    702709             * setting: 
     
    707714             *   contains '2,3,5,6', then 5 will be chosen. 
    708715             */ 
    709             const pj_str_t STR_FMTP_MODE_SET = {"mode-set", 8}; 
    710              
    711716            if (pj_stricmp(&attr->setting.enc_fmtp.param[i].name,  
    712717                           &STR_FMTP_MODE_SET) == 0) 
     
    763768                                              doesn't do sensitivity bits  
    764769                                              reordering */ 
     770         
     771        /* Return back bitrate info to application */ 
     772        attr->info.avg_bps = s->enc_setting.amr_nb? 
     773                             pjmedia_codec_amrnb_bitrates[s->enc_mode]: 
     774                             pjmedia_codec_amrwb_bitrates[s->enc_mode]; 
    765775    } 
    766776#endif 
Note: See TracChangeset for help on using the changeset viewer.