break;
}
}
- the_end: ;
+ the_end:
if (set_dim_ret < 0)
av_log(avctx, AV_LOG_ERROR, "Failed to set dimensions\n");
return next;
}
-static int mpegvideo_split(AVCodecContext *avctx,
- const uint8_t *buf, int buf_size)
-{
- int i;
- uint32_t state= -1;
- int found=0;
-
- for(i=0; i<buf_size; i++){
- state= (state<<8) | buf[i];
- if(state == 0x1B3){
- found=1;
- }else if(found && state != 0x1B5 && state < 0x200 && state >= 0x100)
- return i-3;
- }
- return 0;
-}
-
static int mpegvideo_parse_init(AVCodecParserContext *s)
{
s->pict_type = AV_PICTURE_TYPE_NONE; // first frame might be partial
return 0;
}
-AVCodecParser ff_mpegvideo_parser = {
+const AVCodecParser ff_mpegvideo_parser = {
.codec_ids = { AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO },
.priv_data_size = sizeof(struct MpvParseContext),
.parser_init = mpegvideo_parse_init,
.parser_parse = mpegvideo_parse,
.parser_close = ff_parse_close,
- .split = mpegvideo_split,
};