From b4b9a64bdb61dee30008b1e089ab58ca631100e5 Mon Sep 17 00:00:00 2001 From: "zhaoxiu.zeng" Date: Fri, 13 Feb 2015 00:03:21 +0800 Subject: [PATCH] avcodec/vc1: simplify vc1_split() Signed-off-by: Michael Niedermayer --- libavcodec/vc1_parser.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 3a2308ecc6..b2ba7b6160 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -29,6 +29,7 @@ #include "parser.h" #include "vc1.h" #include "get_bits.h" +#include "internal.h" /** The maximum number of bytes of a sequence, entry point or * frame header whose values we pay any attention to */ @@ -250,20 +251,18 @@ static int vc1_parse(AVCodecParserContext *s, static int vc1_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { - int i; - uint32_t state= -1; - int charged=0; + uint32_t state = -1; + int charged = 0; + const uint8_t *ptr = buf, *end = buf + buf_size; - for(i=0; i