#include "parser.h"
static int parse(AVCodecParserContext *s,
- AVCodecContext *avctx,
- const uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size)
+ AVCodecContext *avctx,
+ const uint8_t **poutbuf, int *poutbuf_size,
+ const uint8_t *buf, int buf_size)
{
- s->pict_type= (buf[0]&0x01) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
+ s->pict_type = (buf[0] & 0x01) ? AV_PICTURE_TYPE_P
+ : AV_PICTURE_TYPE_I;
- *poutbuf = buf;
+ *poutbuf = buf;
*poutbuf_size = buf_size;
return buf_size;
}
AVCodecParser ff_vp8_parser = {
- { CODEC_ID_VP8 },
- 0,
- NULL,
- parse,
+ .codec_ids = { AV_CODEC_ID_VP8 },
+ .parser_parse = parse,
};