Mercurial > libavcodec.hg
comparison mlp_parser.c @ 8248:45cfe1d44e86 libavcodec
mlp: initialize all CRC tables in a common function.
This way the decoder does not have to depend on the parser being initialized
before.
Patch by Laurent Aimar <fenrir at via dot ecp dot fr>.
author | ramiro |
---|---|
date | Wed, 03 Dec 2008 01:14:06 +0000 |
parents | fd24c8628221 |
children | 82dbfe8d2e0b |
comparison
equal
deleted
inserted
replaced
8247:e8cb66bdae99 | 8248:45cfe1d44e86 |
---|---|
147 | 147 |
148 int in_sync; | 148 int in_sync; |
149 | 149 |
150 int num_substreams; | 150 int num_substreams; |
151 } MLPParseContext; | 151 } MLPParseContext; |
152 | |
153 static av_cold int mlp_init(AVCodecParserContext *s) | |
154 { | |
155 ff_mlp_init_crc(); | |
156 return 0; | |
157 } | |
152 | 158 |
153 static int mlp_parse(AVCodecParserContext *s, | 159 static int mlp_parse(AVCodecParserContext *s, |
154 AVCodecContext *avctx, | 160 AVCodecContext *avctx, |
155 const uint8_t **poutbuf, int *poutbuf_size, | 161 const uint8_t **poutbuf, int *poutbuf_size, |
156 const uint8_t *buf, int buf_size) | 162 const uint8_t *buf, int buf_size) |
281 } | 287 } |
282 | 288 |
283 AVCodecParser mlp_parser = { | 289 AVCodecParser mlp_parser = { |
284 { CODEC_ID_MLP }, | 290 { CODEC_ID_MLP }, |
285 sizeof(MLPParseContext), | 291 sizeof(MLPParseContext), |
286 ff_mlp_init_crc2D, | 292 mlp_init, |
287 mlp_parse, | 293 mlp_parse, |
288 NULL, | 294 NULL, |
289 }; | 295 }; |