Changeset 3809 for pjproject


Ignore:
Timestamp:
Oct 11, 2011 3:05:34 AM (13 years ago)
Author:
nanang
Message:

Misc (#1252): Wrong APS/VAS frame header generation for AMR silence/NO_DATA frame caused by using wrong 'OR' operator, was logical 'OR' instead of bitwise (thanks Johan Lantz for the report).

Location:
pjproject/branches/1.x/pjmedia/src/pjmedia-audiodev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp

    r3553 r3809  
    10871087                } else { 
    10881088                    enum {NO_DATA_FT = 15 }; 
    1089                     pj_uint8_t amr_header = 4 || (NO_DATA_FT << 3); 
     1089                    pj_uint8_t amr_header = 4 | (NO_DATA_FT << 3); 
    10901090 
    10911091                    buf.iBuffer.Append(amr_header); 
     
    10961096            } else { /* PJMEDIA_FRAME_TYPE_NONE */ 
    10971097                enum {NO_DATA_FT = 15 }; 
    1098                 pj_uint8_t amr_header = 4 || (NO_DATA_FT << 3); 
     1098                pj_uint8_t amr_header = 4 | (NO_DATA_FT << 3); 
    10991099 
    11001100                buf.iBuffer.Append(amr_header); 
  • pjproject/branches/1.x/pjmedia/src/pjmedia-audiodev/symb_vas_dev.cpp

    r3595 r3809  
    11311131                } else { 
    11321132                    enum {NO_DATA_FT = 15 }; 
    1133                     pj_uint8_t amr_header = 4 || (NO_DATA_FT << 3); 
     1133                    pj_uint8_t amr_header = 4 | (NO_DATA_FT << 3); 
    11341134 
    11351135                    buffer.Append(amr_header); 
     
    11401140            } else { /* PJMEDIA_FRAME_TYPE_NONE */ 
    11411141                enum {NO_DATA_FT = 15 }; 
    1142                 pj_uint8_t amr_header = 4 || (NO_DATA_FT << 3); 
     1142                pj_uint8_t amr_header = 4 | (NO_DATA_FT << 3); 
    11431143 
    11441144                buffer.Append(amr_header); 
Note: See TracChangeset for help on using the changeset viewer.