summaryrefslogtreecommitdiffstats
path: root/libavcodec/mlp.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@via.ecp.fr>2008-12-03 01:14:06 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2008-12-03 01:14:06 +0000
commit7a2efd2e447d5e7c7c0af61417a838b042fb7d0a (patch)
treee355330c3d8bb90886842a6fb70db7062f04ead1 /libavcodec/mlp.c
parent751ccc48521d40505449d1fbfed8c6cd4ad1257d (diff)
downloadffmpeg-streaming-7a2efd2e447d5e7c7c0af61417a838b042fb7d0a.zip
ffmpeg-streaming-7a2efd2e447d5e7c7c0af61417a838b042fb7d0a.tar.gz
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>. Originally committed as revision 15986 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mlp.c')
-rw-r--r--libavcodec/mlp.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libavcodec/mlp.c b/libavcodec/mlp.c
index 2ac2e65..7ef7f97 100644
--- a/libavcodec/mlp.c
+++ b/libavcodec/mlp.c
@@ -43,26 +43,14 @@ const uint8_t ff_mlp_huffman_tables[3][18][2] = {
static int crc_init = 0;
static AVCRC crc_63[1024];
static AVCRC crc_1D[1024];
-
-
-static int crc_init_2D = 0;
static AVCRC crc_2D[1024];
-int av_cold ff_mlp_init_crc2D(AVCodecParserContext *s)
-{
- if (!crc_init_2D) {
- av_crc_init(crc_2D, 0, 16, 0x002D, sizeof(crc_2D));
- crc_init_2D = 1;
- }
-
- return 0;
-}
-
void av_cold ff_mlp_init_crc()
{
if (!crc_init) {
av_crc_init(crc_63, 0, 8, 0x63, sizeof(crc_63));
av_crc_init(crc_1D, 0, 8, 0x1D, sizeof(crc_1D));
+ av_crc_init(crc_2D, 0, 16, 0x002D, sizeof(crc_2D));
crc_init = 1;
}
}
OpenPOWER on IntegriCloud