Revision ee5b34d5

View differences:

libavcodec/mlp_parser.c
77 77
{
78 78
    uint16_t crc;
79 79

  
80
    crc = av_crc(crc_2D, 0, buf, buf_size - 2);
81
    crc ^= AV_RL16(buf + buf_size - 2);
82
    return crc;
83
}
84

  
85
static int av_cold mlp_parse_init(AVCodecParserContext *s)
86
{
80 87
    if (!crc_init) {
81 88
        av_crc_init(crc_2D, 0, 16, 0x002D, sizeof(crc_2D));
82 89
        crc_init = 1;
83 90
    }
84 91

  
85
    crc = av_crc(crc_2D, 0, buf, buf_size - 2);
86
    crc ^= AV_RL16(buf + buf_size - 2);
87
    return crc;
92
    return 0;
88 93
}
89 94

  
90 95
/** Read a major sync info header - contains high level information about
......
305 310
AVCodecParser mlp_parser = {
306 311
    { CODEC_ID_MLP },
307 312
    sizeof(MLPParseContext),
308
    NULL,
313
    mlp_parse_init,
309 314
    mlp_parse,
310 315
    NULL,
311 316
};

Also available in: Unified diff