Mercurial > libavformat.hg
changeset 2332:7dd23262372f libavformat
forw_ptr CRC
author | michael |
---|---|
date | Thu, 09 Aug 2007 12:48:52 +0000 |
parents | 4d1a56112d92 |
children | 892b9d82e812 |
files | nutenc.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/nutenc.c Thu Aug 09 12:38:24 2007 +0000 +++ b/nutenc.c Thu Aug 09 12:48:52 2007 +0000 @@ -180,8 +180,14 @@ static void put_packet(NUTContext *nut, ByteIOContext *bc, ByteIOContext *dyn_bc, int calculate_checksum){ uint8_t *dyn_buf=NULL; int dyn_size= url_close_dyn_buf(dyn_bc, &dyn_buf); + int forw_ptr= dyn_size + 4*calculate_checksum; - put_v(bc, dyn_size + 4*calculate_checksum); + if(forw_ptr > 4096) + init_checksum(bc, av_crc04C11DB7_update, 0); + put_v(bc, forw_ptr); + if(forw_ptr > 4096) + put_le32(bc, get_checksum(bc)); + if(calculate_checksum) init_checksum(bc, av_crc04C11DB7_update, 0); put_buffer(bc, dyn_buf, dyn_size); @@ -350,7 +356,7 @@ put_flush_packet(bc); - //FIXME info header, header repeation, header packet CRC, ... + //FIXME info header, header repeation, ... return 0; }