29 0, 0, 1, 0x0f, 0xc2, 0, 0, 0x70, 0x07, 0x88, 0x80,
30 0, 0, 1, 0x0e, 0, 0, 0x80,
35 int payload_size,
int trailing_zeros)
49 memset(buf +
size, 0xff, payload_size);
54 memset(buf +
size - trailing_zeros, 0, trailing_zeros);
66 if (!parser || !
ctx) {
75 parse(parser,
ctx,
"initial I", 1, 0xc1, 37, 0);
76 parse(parser,
ctx,
"skipped P", 0, 0xf2, 1, 0);
77 parse(parser,
ctx,
"B after skipped P", 0, 0x80, 2, 0);
78 parse(parser,
ctx,
"I ending in zeros", 0, 0xc1, 37, 2);
79 parse(parser,
ctx,
"P starting in 01", 0, 0x01, 37, 0);
80 parse(parser,
ctx,
"I after P", 0, 0xc1, 37, 0);
static AVFormatContext * ctx
static const uint8_t sequence[]
static void parse(AVCodecParserContext *parser, AVCodecContext *ctx, const char *name, int init, uint8_t header, int payload_size, int trailing_zeros)
Libavcodec external API header.
#define PARSER_FLAG_COMPLETE_FRAMES
Convenience header that includes libavutil's core.
__device__ int printf(const char *,...)
int(* init)(AVBSFContext *ctx)
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
AVCodecParserContext * av_parser_init(enum AVCodecID codec_id)
void av_parser_close(AVCodecParserContext *s)
int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
Parse a packet.
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
#define AV_NOPTS_VALUE
Undefined timestamp value.
static const uint8_t header[24]
main external API structure.