21 #include "libavutil/common.h"
22 #include "libavutil/intreadwrite.h"
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;
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define FFSWAP(type, a, b)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Libavcodec external API header.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
#define AV_LOG_INFO
Standard information.
main external API structure.
int channels
number of audio channels
int strict_std_compliance
strictly follow the standard (MPEG4, ...).