aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-11 08:32:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-11 08:32:25 +0000
commita26e1d4c1f7c93d24250dd9c0786241f92fcdea4 (patch)
tree041a44d6af64ccc7f64f431e3ac069b066fd1d65
parent177e5460b9fe9043e5f70dde7718298a43c55d48 (diff)
downloadffmpeg-a26e1d4c1f7c93d24250dd9c0786241f92fcdea4.tar.gz
checksum doesnt cover the forward_ptr anymore
Originally committed as revision 4579 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/nut.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c
index aee1606edb..2d63cc7ba7 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -328,10 +328,10 @@ static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_ch
int64_t start, size;
start= url_ftell(bc) - 8;
- init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);
-
size= get_v(bc);
+ init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);
+
nut->packet_start[2] = start;
nut->written_packet_size= size;
@@ -465,12 +465,12 @@ static int put_packetheader(NUTContext *nut, ByteIOContext *bc, int max_size, in
nut->packet_start[2]= url_ftell(bc) - 8;
nut->written_packet_size = max_size;
- if(calculate_checksum)
- init_checksum(bc, update_adler32, 0);
-
/* packet header */
put_v(bc, nut->written_packet_size); /* forward ptr */
+ if(calculate_checksum)
+ init_checksum(bc, update_adler32, 0);
+
return 0;
}