diff 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
line wrap: on
line diff
--- a/mlp_parser.c	Tue Dec 02 18:26:55 2008 +0000
+++ b/mlp_parser.c	Wed Dec 03 01:14:06 2008 +0000
@@ -150,6 +150,12 @@
     int num_substreams;
 } MLPParseContext;
 
+static av_cold int mlp_init(AVCodecParserContext *s)
+{
+    ff_mlp_init_crc();
+    return 0;
+}
+
 static int mlp_parse(AVCodecParserContext *s,
                      AVCodecContext *avctx,
                      const uint8_t **poutbuf, int *poutbuf_size,
@@ -283,7 +289,7 @@
 AVCodecParser mlp_parser = {
     { CODEC_ID_MLP },
     sizeof(MLPParseContext),
-    ff_mlp_init_crc2D,
+    mlp_init,
     mlp_parse,
     NULL,
 };