X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Frv34_parser.c;h=8af74431c0b191ef318c2da15387cba3f3efd457;hb=f4c444e17d137c786f0ed2da0e5943df505d5f9e;hp=c2563a5fdc48aed9b0b3304f34a851b4ab555832;hpb=48ce8b8da714558c8738610d5512b6c3c95c901a;p=ffmpeg diff --git a/libavcodec/rv34_parser.c b/libavcodec/rv34_parser.c index c2563a5fdc4..8af74431c0b 100644 --- a/libavcodec/rv34_parser.c +++ b/libavcodec/rv34_parser.c @@ -43,7 +43,6 @@ static int rv34_parse(AVCodecParserContext *s, const uint8_t *buf, int buf_size) { RV34ParseContext *pc = s->priv_data; - int off; int type, pts, hdr; if (buf_size < 13 + *buf * 8) { @@ -52,9 +51,8 @@ static int rv34_parse(AVCodecParserContext *s, return buf_size; } - off = AV_RL32(buf + 5); hdr = AV_RB32(buf + 9 + *buf * 8); - if (avctx->codec_id == CODEC_ID_RV30) { + if (avctx->codec_id == AV_CODEC_ID_RV30) { type = (hdr >> 27) & 3; pts = (hdr >> 7) & 0x1FFF; } else { @@ -78,20 +76,18 @@ static int rv34_parse(AVCodecParserContext *s, return buf_size; } -#ifdef CONFIG_RV30_PARSER +#if CONFIG_RV30_PARSER AVCodecParser ff_rv30_parser = { - { CODEC_ID_RV30 }, - sizeof(RV34ParseContext), - NULL, - rv34_parse, + .codec_ids = { AV_CODEC_ID_RV30 }, + .priv_data_size = sizeof(RV34ParseContext), + .parser_parse = rv34_parse, }; #endif -#ifdef CONFIG_RV40_PARSER +#if CONFIG_RV40_PARSER AVCodecParser ff_rv40_parser = { - { CODEC_ID_RV40 }, - sizeof(RV34ParseContext), - NULL, - rv34_parse, + .codec_ids = { AV_CODEC_ID_RV40 }, + .priv_data_size = sizeof(RV34ParseContext), + .parser_parse = rv34_parse, }; #endif