27 #define BITSTREAM_READER_LE 38 const uint8_t **poutbuf,
int *poutbuf_size,
57 *poutbuf_size = buf_size;
61 while (buf_size || t->
index + needed <= pc->
index) {
69 consumed += tmp_buf_size;
71 buf_size -= tmp_buf_size;
108 return buf_size + consumed;
117 *poutbuf_size = buf_size;
int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, TAKStreamInfo *ti, int log_level_offset)
Validate and decode a frame header.
AVCodecParser ff_tak_parser
int duration
Duration of the current frame.
static int tak_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size)
#define TAK_FRAME_FLAG_HAS_INFO
static int get_bits_count(const GetBitContext *s)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
void ff_parse_close(AVCodecParserContext *s)
int overread
the number of bytes which where irreversibly read from the next frame
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
main external API structure.
TAK (Tom's lossless Audio Kompressor) decoder/demuxer common functions.
#define PARSER_FLAG_COMPLETE_FRAMES
#define TAK_MAX_FRAME_HEADER_BYTES
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.