Revision ccb15994

View differences:

libavformat/aviobuf.c
298 298
void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum){
299 299
    s->update_checksum= update_checksum;
300 300
    if(s->update_checksum){
301
        s->checksum= s->update_checksum(checksum, NULL, 0);
301
        s->checksum= checksum;
302 302
        s->checksum_ptr= s->buf_ptr;
303 303
    }
304 304
}
libavformat/nut.c
331 331

  
332 332
    size= get_v(bc);
333 333

  
334
    init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 0);
334
    init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 1);
335 335

  
336 336
    nut->packet_start[2] = start;
337 337
    nut->written_packet_size= size;
......
476 476
    put_v(bc, nut->written_packet_size); /* forward ptr */
477 477

  
478 478
    if(calculate_checksum)
479
        init_checksum(bc, av_adler32_update, 0);
479
        init_checksum(bc, av_adler32_update, 1);
480 480

  
481 481
    return 0;
482 482
}

Also available in: Unified diff