Commit ccb15994 authored by Michael Niedermayer's avatar Michael Niedermayer

fix regression failure after adler simplification

Originally committed as revision 5803 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 79dc59b7
......@@ -298,7 +298,7 @@ unsigned long get_checksum(ByteIOContext *s){
void init_checksum(ByteIOContext *s, unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum){
s->update_checksum= update_checksum;
if(s->update_checksum){
s->checksum= s->update_checksum(checksum, NULL, 0);
s->checksum= checksum;
s->checksum_ptr= s->buf_ptr;
}
}
......
......@@ -331,7 +331,7 @@ static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_ch
size= get_v(bc);
init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 0);
init_checksum(bc, calculate_checksum ? av_adler32_update : NULL, 1);
nut->packet_start[2] = start;
nut->written_packet_size= size;
......@@ -476,7 +476,7 @@ static int put_packetheader(NUTContext *nut, ByteIOContext *bc, int max_size, in
put_v(bc, nut->written_packet_size); /* forward ptr */
if(calculate_checksum)
init_checksum(bc, av_adler32_update, 0);
init_checksum(bc, av_adler32_update, 1);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment