if(start != nut->packet_start + nut->written_packet_size){
if(nut->written_packet_size >= 0 && start != nut->packet_start + nut->written_packet_size){
static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int prefix_length, int calculate_checksum){    int64_t start, size, last_size;    start= url_ftell(bc) - prefix_length;    if(start != nut->packet_start + nut->written_packet_size){        av_log(nut->avf, AV_LOG_ERROR, "get_packetheader called at weird position\n");        if(prefix_length<8)            return -1;    }        init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);    size= get_v(bc);    last_size= get_v(bc);    if(nut->written_packet_size != last_size){        av_log(nut->avf, AV_LOG_ERROR, "packet size missmatch %d != %lld at %lld\n", nut->written_packet_size, last_size, start);        if(prefix_length<8)            return -1;    }    nut->last_packet_start = nut->packet_start;    nut->packet_start = start;    nut->written_packet_size= size;    return size;}