28 uint8_t **poutbuf,
int *poutbuf_size,
29 const uint8_t *buf,
int buf_size,
int keyframe){
30 uint32_t header, extraheader;
31 int mode_extension, header_size;
39 mode_extension= (header>>4)&3;
44 *poutbuf_size= buf_size;
61 if((extraheader&
MP3_MASK) != (header&MP3_MASK))
62 goto output_unchanged;
64 header_size= (header&0x10000) ? 4 : 6;
66 *poutbuf_size= buf_size - header_size;
71 if((header & (3<<19)) != 3<<19){
72 (*poutbuf)[1] &= 0x3F;
73 (*poutbuf)[1] |= mode_extension<<6;
74 FFSWAP(
int, (*poutbuf)[1], (*poutbuf)[2]);
76 (*poutbuf)[1] &= 0x8F;
77 (*poutbuf)[1] |= mode_extension<<4;